﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <xsl:variable name="ItemID" select="normalize-space(AjaxRequest/Params/ItemID)" />
        <xsl:variable name="HostName" select="normalize-space(AjaxRequest/HostName)"/>
        <xsl:variable name="CommunitiesCount" select="normalize-space(AjaxRequest/CommunitiesCount)"/>
        <xsl:variable name="NotificationCount" select="normalize-space(AjaxRequest/NotificationCount)"/>
        <xsl:variable name="GoalCount" select="normalize-space(AjaxRequest/GoalCount)"/>
        

        <table class="tableMaster">
            <tr>
                <td>
                    <span class="link"
                          onClick = "GetActionPlan('divClientPortalOperations_Container',{$ItemID},'99','0');
                                        document.getElementById('divClientPortalRight_1').innerHTML = '';">
                        My Goals<xsl:if test="$GoalCount &gt; 0">
                            (<xsl:value-of select="$GoalCount"/>)
                        </xsl:if>
                    </span>
                </td>
            </tr>
            <tr>
                <td>
                    <a href="http://{$HostName}/CreateGoal.aspx?ID={$ItemID}" style="cursor:pointer;" class="link">
                        + Add New Goal
                    </a>
                </td>
            </tr>
            <tr>
                <td>
                    <div>
                        <div class="link"
                              onClick = "return Portal_Mycommunities({$ItemID},'DivPortal_MyCommunities');">
                            My Communities<xsl:if test="$CommunitiesCount &gt; 0">
                                (<xsl:value-of select="$CommunitiesCount"/>)
                            </xsl:if>
                        </div>
                        <div id="DivPortal_MyCommunities" style="padding-top:5px;display:none;">
                        </div>
                    </div>
                </td>
            </tr>
            <!--<tr>
                <td>
                    <span class="link"
                          onClick = "return Portal_MyFriends();">
                        My Friends
                    </span>
                </td>
            </tr>-->
            <tr>
                <td>
                    <a href="http://{$HostName}/Notifications.aspx" style="cursor:pointer;" class="link">
                        My Notifications<xsl:if test="$NotificationCount &gt; 0">
                            (<xsl:value-of select="$NotificationCount"/>)
                        </xsl:if>
                    </a>
                </td>
            </tr>
        </table>
    </xsl:template>
</xsl:stylesheet>