﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
	<xsl:output method="xml" indent="yes"/>

	<xsl:template match="/">
		<xsl:variable name="UserID" select="/AjaxRequest/Params/UserID"></xsl:variable>
		<xsl:variable name="MasterPortalItemID" select="/AjaxRequest/Params/MasterPortalItemID"></xsl:variable>
		<xsl:variable name="PortalItemID" select="/AjaxRequest/Params/PortalItemID"></xsl:variable>
		<xsl:variable name="SuccessKey" select="/AjaxRequest/Params/SuccessKey"></xsl:variable>
		<xsl:variable name="DisplayCurrentDate" select="/AjaxRequest/DisplayCurrentDate"></xsl:variable>
		<xsl:variable name="CurrentDate" select="/AjaxRequest/CurrentDate"></xsl:variable>
		<xsl:variable name="NextDate" select="/AjaxRequest/NextDate"></xsl:variable>
		<xsl:variable name="PrevDate" select="/AjaxRequest/PrevDate"></xsl:variable>
		<xsl:variable name="DivID" select="/AjaxRequest/Params/DivID"></xsl:variable>
		<xsl:variable name="LoggedInUser" select="/AjaxRequest/LoggedInUser"></xsl:variable>
		<xsl:variable name="GoalItemID" select="/AjaxRequest/Params/GoalItemID"></xsl:variable>
		<xsl:variable name="UpcomingDivID" select="/AjaxRequest/Params/UpcomingDivID"></xsl:variable>
		<xsl:variable name="SpanCalenderId">
			<xsl:choose>
				<xsl:when test="/AjaxRequest/Params/SpanCalenderId ='spanDisplayCurrentDateNotification'">
					<xsl:text>spanDisplayCurrentDateNotification</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text>spanDisplayCurrentDate</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="GoalID">
			<xsl:choose>
				<xsl:when test="$GoalItemID">
					<xsl:value-of select="$GoalItemID"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text>-99</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>

		<i  class="glyphicon glyphicon-menu-left arow  onMouseOver" PrevDate="{$PrevDate}"
			onclick="$(body).css('overflow','scroll');loadUpComingGoalTask_3_0('{$GoalID}', '{$UpcomingDivID}', 1,{$UserID} , {$MasterPortalItemID},{$PortalItemID}, '{$SuccessKey}', '', '','{$PrevDate}',-99);displayDueDate({$UserID},{$MasterPortalItemID},{$PortalItemID},'{$PrevDate}', '{$DivID}','{$GoalID}','{$UpcomingDivID}','{$SpanCalenderId}','{$SuccessKey}');event.stopPropagation(); ">
		</i>
		<spanlbl name="&lt;OperationalData&gt;
			&lt;Version&gt;2.0&lt;/Version&gt;
			&lt;UserID&gt;{$UserID}&lt;/UserID&gt;
			&lt;GoalItemID&gt;{$GoalID}&lt;/GoalItemID&gt;
			&lt;MasterPortalItemID&gt;{$MasterPortalItemID}&lt;/MasterPortalItemID&gt;
			&lt;PortalItemID&gt;{$PortalItemID}&lt;/PortalItemID&gt;
			&lt;Mode&gt;DisplayDate30&lt;/Mode&gt;
			&lt;ItemDivPrefix&gt;{$DivID}&lt;/ItemDivPrefix&gt;
			&lt;UpcomingDiv&gt;{$UpcomingDivID}&lt;/UpcomingDiv&gt;	
			&lt;SpanCalenderID&gt;{$SpanCalenderId}&lt;SpanCalenderID&gt;
			&lt;SuccessKey&gt;{$SuccessKey}&lt;SuccessKey&gt;
			&lt;/OperationalData&gt;" id="{$SpanCalenderId}" class="onMouseOver" onclick="dp('{$SpanCalenderId}','{$SpanCalenderId}');event.stopPropagation();">
			<xsl:value-of select="$DisplayCurrentDate"/>
		</spanlbl>
		<i  class="glyphicon glyphicon-menu-right arow onMouseOver" NextDate="{$NextDate}"
			onclick="$(body).css('overflow','scroll');loadUpComingGoalTask_3_0('{$GoalID}', '{$UpcomingDivID}', 1,{$UserID} , {$MasterPortalItemID},{$PortalItemID}, '{$SuccessKey}', '', '','{$NextDate}',-99);displayDueDate({$UserID},{$MasterPortalItemID},{$PortalItemID},'{$NextDate}', '{$DivID}','{$GoalID}','{$UpcomingDivID}','{$SpanCalenderId}','{$SuccessKey}');event.stopPropagation();">
		</i>  
	</xsl:template>
</xsl:stylesheet>
