﻿<?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:import href="GoalTaskItemDetailed.xslt"/>
	<xsl:import href="AddItemPanel.xslt"/>
	<xsl:output method="xml" indent="yes"/>

	<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
	<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
	<xsl:key name="TopicKey" match="Record/Topic" use="." />
	<xsl:key name="ResponsibleKey" match="Record/Responsible" use="." />
	<xsl:key name="DueDateLabelKey" match="Record/DueDateLabel" use="." />
	<xsl:key name="PriorityKey" match="Record/Priority" use="." />
	<xsl:key name="CompletionPercentageKey" match="Record/CompletionPercentage" use="." />

	<xsl:template match="/">
		<xsl:variable name="TemplateURL" select="AjaxRequest/TemplateURL"></xsl:variable>
		<xsl:variable name="itemID" select="AjaxRequest/Params/ItemID"></xsl:variable>
		<xsl:variable name="GoalColumns" select="AjaxRequest/Goal/Columns"></xsl:variable>
		<xsl:variable name="ResponsibleColumns" select="AjaxRequest/Goal/ResponsibleList"></xsl:variable>
		<xsl:variable name="GoalIsLand" select="AjaxRequest/Goal/IsLand"></xsl:variable>
		<xsl:variable name="GoalsRecords" select="AjaxRequest/Goal/Records"></xsl:variable>
		<xsl:variable name="SortColName" select="AjaxRequest/Params/sortColName"/>
		<xsl:variable name="SortOrder" select="AjaxRequest/Params/sortOrder"/>

		<xsl:variable name="PageNumber" select="AjaxRequest/Params/PageNumber"/>
		<xsl:variable name="NextPageNumber" select="AjaxRequest/NextPageNumber"/>
		<xsl:variable name="PreviousPageNumber" select="AjaxRequest/PreviousPageNumber"/>
		<xsl:variable name="TotalRec" select="$GoalsRecords/Record/TotalRec"/>
		<xsl:variable name="PageSize" select="AjaxRequest/PageSize"></xsl:variable>
		<xsl:variable name="LoggedInUser" select="AjaxRequest/LoggedInUserID"/>
		<!--<xsl:variable name="PermissionID" select="$GoalsRecords/Record/PermissionID"></xsl:variable>-->

		<xsl:variable name="PermissionID" select="AjaxRequest/Goal/GoalPermissionID"></xsl:variable>

		<xsl:variable name="TotalPages">
			<xsl:value-of select="ceiling($TotalRec div $PageSize)"/>
		</xsl:variable>

		<xsl:variable name="IsHideComplete" select="AjaxRequest/Params/IsHideComplete"></xsl:variable>
		<xsl:variable name="IsMyTask" select="AjaxRequest/Params/IsMyTask"/>
		<xsl:variable name="IsThisWeek" select="AjaxRequest/Params/IsThisWeek"/>
		<xsl:variable name="SearchTask" select="AjaxRequest/Params/SearchTask"/>
		<xsl:variable name="SearchTopic" select="AjaxRequest/Params/SearchTopic"/>
		<xsl:variable name="ItemDetail" select="AjaxRequest/ItemDetailData/ItemDetail/."></xsl:variable>
		<xsl:variable name="List" select="AjaxRequest/Goal/List"/>
		<xsl:variable name="Worksheets" select="AjaxRequest/Worksheets/."/>
		<xsl:variable name="ActionPlan" select="AjaxRequest/Templates/."></xsl:variable>


		<xsl:variable name="Filters" select="AjaxRequest/Filters"/>
		<xsl:variable name="TargetArea" select="AjaxRequest/Params/TargetArea"></xsl:variable>
		<xsl:variable name="callBack">
			'<xsl:value-of select="AjaxRequest/CallBackSignature"/>'
		</xsl:variable>
		<xsl:variable name="LoadTaskFunc">
			<xsl:text>Grid_3_0_Filter(</xsl:text>
			<xsl:value-of select="$callBack"></xsl:value-of>
			<xsl:text>);</xsl:text>
		</xsl:variable>
		<xsl:variable name="SaveFiltersFunc">
			<xsl:text>saveGoalFilterSettings(</xsl:text>
			<xsl:text>'chk_</xsl:text><xsl:value-of select="$itemID"/><xsl:text>_TaskFilter_HideCompleted'</xsl:text>
			<xsl:text>, 'chk_</xsl:text><xsl:value-of select="$itemID"/><xsl:text>_TaskFilter_MyTask'</xsl:text>
			<xsl:text>, 'chk_</xsl:text><xsl:value-of select="$itemID"/><xsl:text>_TaskFilter_ThisWeek'</xsl:text>
			,''
			, '<xsl:value-of select="$itemID"/>'
			<xsl:text>);</xsl:text>
		</xsl:variable>
		<xsl:variable name="PostFix">
			<xsl:choose>
				<xsl:when test="$TargetArea ='AddTaskSurvey'">
					<xsl:value-of select="$TargetArea"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text></xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<input type="hidden" class="hdfTargetArea{$TargetArea}"  value="{$TargetArea}"/>
		<!--<xsl:if test="$TargetArea !='AddTaskSurvey'">-->
		<div style="margin-bottom: 40px; margin-top: 7px;">
			<div  class="packageTitle col-md-3">
				<select class="dropdown TxtWid" id="ddl_{$itemID}_TopicFilter{$PostFix}" onchange="{$LoadTaskFunc}">
					<option value="0"> </option>
					<xsl:for-each select="$ItemDetail/ItemData">
						<xsl:choose>
							<xsl:when test="$SearchTopic = ./ItemID">
								<option selected="selected" value="{./ItemID}">
									<xsl:value-of select="./Item"/>
								</option>
							</xsl:when>
							<xsl:otherwise>
								<option value="{./ItemID}">
									<xsl:value-of select="./Item"/>
								</option>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:for-each>
				</select>
			</div>
			<div  class="packageTitle col-md-2">
				<xsl:choose>
					<xsl:when test="translate($IsHideComplete, $smallcase, $uppercase)='TRUE'">
						<input type="checkbox"  id="chk_{$itemID}_TaskFilter_HideCompleted{$PostFix}" checked=""
							   onclick="{$LoadTaskFunc} {$SaveFiltersFunc}"></input>
					</xsl:when>
					<xsl:otherwise>
						<input type="checkbox"  id="chk_{$itemID}_TaskFilter_HideCompleted{$PostFix}"
							   onclick="{$LoadTaskFunc} {$SaveFiltersFunc}"></input>
					</xsl:otherwise>
				</xsl:choose>
				<span>Hide Completed</span>
			</div>
			<div  class="packageTitle col-md-2 ChkLeft1">
				<xsl:choose>
					<xsl:when test="translate($IsMyTask, $smallcase, $uppercase)='TRUE'">
						<input type="checkbox" checked=""  id="chk_{$itemID}_TaskFilter_MyTask{$PostFix}"
							   onclick="{$LoadTaskFunc} {$SaveFiltersFunc}"></input>
					</xsl:when>
					<xsl:otherwise>
						<input type="checkbox"  id="chk_{$itemID}_TaskFilter_MyTask{$PostFix}"
							   onclick="{$LoadTaskFunc} {$SaveFiltersFunc}"></input>
					</xsl:otherwise>
				</xsl:choose>
				<span>My Tasks</span>
			</div>
			<div  class="packageTitle col-md-2 ChkLeft2">
				<xsl:choose>
					<xsl:when test="translate($IsThisWeek, $smallcase, $uppercase)='TRUE'">
						<input type="checkbox" checked=""  id="chk_{$itemID}_TaskFilter_ThisWeek{$PostFix}"
							   onclick="{$LoadTaskFunc} {$SaveFiltersFunc}"></input>
					</xsl:when>
					<xsl:otherwise>
						<input type="checkbox"  id="chk_{$itemID}_TaskFilter_ThisWeek{$PostFix}"
							   onclick="{$LoadTaskFunc} {$SaveFiltersFunc}"></input>
					</xsl:otherwise>
				</xsl:choose>
				<span>This Week</span>
			</div>
			<div  class="packageTitle  col-md-2 TxtWid">
				<input type="text" class="SearchTask" id="txt_{$itemID}_TaskFilter_Search{$PostFix}" value="{$SearchTask}"
					   onkeyup="Grid_3_0_Filter_Search('txt_{$itemID}_TaskFilter_Search{$PostFix}',event)" onblur="{$LoadTaskFunc}"></input>
			</div>
		</div>
		<!--</xsl:if>-->
		<!--full width table grid-->
		<!--SortColName-->

		<table class="table table-striped table-responsive full_screen VerMid" id="tblTask_FullGrid">
			<tr class="ExpandRow" >
				<xsl:for-each select="$GoalColumns/Col[Visibility=1]">
					<xsl:variable name="SortType">
						<xsl:choose>
							<xsl:when test="ColName = $SortColName">
								<xsl:choose>
									<xsl:when test="$SortOrder= 'asc'">
										<xsl:text>desc</xsl:text>
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>asc</xsl:text>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:when>
							<xsl:otherwise>
								<xsl:text>asc</xsl:text>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<th class="onMouseOver" onClick="Grid_3_0_Sort('{ColName}','{$SortType}',{$callBack})">
						<xsl:value-of select="ColDisplayName"/>
					</th>
				</xsl:for-each>
			</tr>
			<xsl:variable name="GetGoalBySort">
				<xsl:choose>
					<xsl:when test="$SortColName = '' or $SortColName = 'Topic'">
						<!--<xsl:copy-of select="$GoalsRecords/Record[not(following::Topic = Topic)]/Topic"/>-->
						<xsl:copy-of select="$GoalsRecords/Record/Topic[generate-id() = generate-id(key('TopicKey',.))]"/>
					</xsl:when>
					<xsl:when test="$SortColName = 'Responsible'">
						<xsl:copy-of select="$GoalsRecords/Record/Responsible[generate-id() = generate-id(key('ResponsibleKey',.))]"/>
					</xsl:when>
					<xsl:when test="$SortColName = 'DueDateLabel'">
						<xsl:copy-of select="$GoalsRecords/Record/DueDateLabel[generate-id() = generate-id(key('DueDateLabelKey',.))]"/>
					</xsl:when>
					<xsl:when test="$SortColName = 'Priority'">
						<xsl:copy-of select="$GoalsRecords/Record/Priority[generate-id() = generate-id(key('PriorityKey',.))]"/>
					</xsl:when>
					<xsl:when test="$SortColName = 'CompletionPercentage'">
						<xsl:copy-of select="$GoalsRecords/Record/CompletionPercentage[generate-id() = generate-id(key('CompletionPercentageKey',.))]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text></xsl:text>
					</xsl:otherwise>
				</xsl:choose>

			</xsl:variable>
			<!--<xsl:for-each select="$GoalsRecords/Record/Topic/text()[generate-id() = generate-id(key('TopicKey',.))]">-->

			<xsl:choose>
				<xsl:when test="$GetGoalBySort != ''">
					<xsl:for-each select="msxsl:node-set($GetGoalBySort)/child::node()">
						<xsl:variable name="GroupBy">
							<xsl:value-of select="."/>
						</xsl:variable>
						<tr>
							<td colspan="{count($GoalColumns/Col[Visibility=1])}" class="SpnHeading">
								<xsl:choose>
									<xsl:when test="$SortColName = 'Priority'">
										<span class="star-default glyphicon glyphicon-star star_{$GroupBy}">
										</span>
									</xsl:when>
									<xsl:when test="$SortColName = 'CompletionPercentage'">
										<span style="color: " class="onMouseOver star-default glyphicon circle_{round($GroupBy)}" >
										</span>
									</xsl:when>
									<xsl:otherwise>
										<span>
											<xsl:value-of select="$GroupBy"/>
										</span>
									</xsl:otherwise>
								</xsl:choose>

							</td>
						</tr>
						<xsl:variable name="GetGoalRecordGroupBy">
							<xsl:choose>
								<xsl:when test="$SortColName = 'Topic'">
									<xsl:copy-of select="$GoalsRecords/Record[Topic=$GroupBy]"/>
								</xsl:when>
								<xsl:when test="$SortColName = 'Responsible'">
									<xsl:copy-of select="$GoalsRecords/Record[Responsible=$GroupBy]"/>
								</xsl:when>
								<xsl:when test="$SortColName = 'DueDateLabel'">
									<xsl:copy-of select="$GoalsRecords/Record[DueDateLabel=$GroupBy]"/>
								</xsl:when>
								<xsl:when test="$SortColName = 'Priority'">
									<xsl:copy-of select="$GoalsRecords/Record[Priority=$GroupBy]"/>
								</xsl:when>
								<xsl:when test="$SortColName = 'CompletionPercentage'">
									<xsl:copy-of select="$GoalsRecords/Record[CompletionPercentage=$GroupBy]"/>
								</xsl:when>
								<xsl:otherwise>
									<xsl:copy-of select="$GoalsRecords/Record[Topic=$GroupBy]"/>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:variable>
						<xsl:variable name="GoalCount">
							<xsl:value-of select="count($GoalColumns/Col[Visibility=1])"/>
						</xsl:variable>
						<xsl:for-each select="msxsl:node-set($GetGoalRecordGroupBy)/child::node()">
							<xsl:call-template name="GoalTaskFull">
								<xsl:with-param name="CurrentRecordRow" select="."></xsl:with-param>
								<xsl:with-param name="GoalColumns" select="$GoalColumns"></xsl:with-param>
								<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
								<xsl:with-param name="itemID" select="$itemID"></xsl:with-param>
								<xsl:with-param name="List" select="$List"></xsl:with-param>
								<xsl:with-param name="ResponsibleColumns" select="$ResponsibleColumns"></xsl:with-param>
							</xsl:call-template>
						</xsl:for-each>
					</xsl:for-each>
				</xsl:when>
				<xsl:otherwise>
					<xsl:for-each select="$GoalsRecords/Record">
						<xsl:call-template name="GoalTaskFull">
							<xsl:with-param name="CurrentRecordRow" select="."></xsl:with-param>
							<xsl:with-param name="GoalColumns" select="$GoalColumns"></xsl:with-param>
							<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
							<xsl:with-param name="itemID" select="$itemID"></xsl:with-param>
							<xsl:with-param name="List" select="$List"></xsl:with-param>
							<xsl:with-param name="ResponsibleColumns" select="$ResponsibleColumns"></xsl:with-param>
						</xsl:call-template>
					</xsl:for-each>
				</xsl:otherwise>
			</xsl:choose>
		</table>
		<!--full width table grid end-->
		<!--Tab width table grid-->
		<!--Mobile View Sort Dropdown-->
		<select id="ddlHeadSorting{$PostFix}" onChange="Grid_3_0_SortMobileView('ddlHeadSorting{$PostFix}', {$callBack});" class="TxtWid mrgnbtm20 dropdown tab_screen">
			<xsl:for-each select="$GoalColumns/Col[Visibility=1]">
				<xsl:variable name="ColumnName">
					<xsl:choose>
						<xsl:when test="ColName='CompletionPercentage'">
							<xsl:text>Completion Percentage</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="ColDisplayName"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="ColName = $SortColName and ColName != 'Topic'">
						<option value="{ColName}" selected="">
							<xsl:value-of select="$ColumnName"/>
						</option>
					</xsl:when>
					<xsl:when test="ColName='Topic' and ($SortColName='' or ColName=$SortColName)">
						<option value="{ColName}" selected="">
							<xsl:value-of select="$ColumnName"/>
						</option>
					</xsl:when>
					<xsl:otherwise>
						<option value="{ColName}">
							<xsl:value-of select="$ColumnName"/>
						</option>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</select>
		
		<!--Add Task Field start-->
		<xsl:call-template name="AddTaskAndWorksheetTemplate">
			<xsl:with-param name="Worksheets" select="$Worksheets"></xsl:with-param>
			<xsl:with-param name="itemID" select="$itemID"></xsl:with-param>
			<xsl:with-param name="ItemDetail" select="$ItemDetail"></xsl:with-param>
			<xsl:with-param name="SearchTopic" select="$SearchTopic"></xsl:with-param>
			<xsl:with-param name="ResponsibleColumns" select="$ResponsibleColumns"></xsl:with-param>
			<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
			<xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
			<xsl:with-param name="PermissionID" select="$PermissionID"></xsl:with-param>
			<xsl:with-param name="TaskDisplay" select="'display:inline-block;'"></xsl:with-param>
			<xsl:with-param name="WorskSheetDisplay" select="'display:none;'"></xsl:with-param>
			<xsl:with-param name="ShowTask" select="'Yes'"></xsl:with-param>
			<xsl:with-param name="ShowWorkSheet" select="'Yes'"></xsl:with-param>
			<xsl:with-param name="SelectedUserID" select="$LoggedInUser"></xsl:with-param>
			<xsl:with-param name="TargetArea" select="$TargetArea"></xsl:with-param>
			<xsl:with-param name="ActionPlan" select="$ActionPlan"></xsl:with-param>
		</xsl:call-template>
		<!--Add Task Field end -->
		<!--Mobile View Sort DropDown End Here-->
		<div class="tab_screen" id="tabScreenTaskList">
			<div class="tab_grid TabWid noBorder" id="divIsLandTask">
				<xsl:variable name="GetGoalBySort">
					<xsl:choose>
						<xsl:when test="$SortColName = '' or $SortColName = 'Topic'">
							<!--<xsl:copy-of select="$GoalsRecords/Record[not(following::Topic = Topic)]/Topic"/>-->
							<xsl:copy-of select="$GoalsRecords/Record/Topic[generate-id() = generate-id(key('TopicKey',.))]"/>
						</xsl:when>
						<xsl:when test="$SortColName = 'Responsible'">
							<xsl:copy-of select="$GoalsRecords/Record/Responsible[generate-id() = generate-id(key('ResponsibleKey',.))]"/>
						</xsl:when>
						<xsl:when test="$SortColName = 'DueDateLabel'">
							<xsl:copy-of select="$GoalsRecords/Record/DueDateLabel[generate-id() = generate-id(key('DueDateLabelKey',.))]"/>
						</xsl:when>
						<xsl:when test="$SortColName = 'Priority'">
							<xsl:copy-of select="$GoalsRecords/Record/Priority[generate-id() = generate-id(key('PriorityKey',.))]"/>
						</xsl:when>
						<xsl:when test="$SortColName = 'CompletionPercentage'">
							<xsl:copy-of select="$GoalsRecords/Record/CompletionPercentage[generate-id() = generate-id(key('CompletionPercentageKey',.))]"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text></xsl:text>
						</xsl:otherwise>
					</xsl:choose>

				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$GetGoalBySort != ''">
						<xsl:for-each select="msxsl:node-set($GetGoalBySort)/child::node()">
							<xsl:variable name="GroupBy">
								<xsl:value-of select="."/>
							</xsl:variable>
							<div class="fontstyl">
								<xsl:choose>
									<xsl:when test="$SortColName = 'Priority'">
										<span class="star-default glyphicon glyphicon-star star_{$GroupBy}">
										</span>
									</xsl:when>
									<xsl:when test="$SortColName = 'CompletionPercentage'">
										<span style="color: " class="onMouseOver star-default glyphicon circle_{round($GroupBy)}" >
										</span>
									</xsl:when>
									<xsl:otherwise>
										<span>
											<xsl:value-of select="$GroupBy"/>
										</span>
									</xsl:otherwise>
								</xsl:choose>
							</div>
							<xsl:variable name="GetGoalRecordGroupBy">
								<xsl:choose>
									<xsl:when test="$SortColName = 'Topic'">
										<xsl:copy-of select="$GoalsRecords/Record[Topic=$GroupBy]"/>
									</xsl:when>
									<xsl:when test="$SortColName = 'Responsible'">
										<xsl:copy-of select="$GoalsRecords/Record[Responsible=$GroupBy]"/>
									</xsl:when>
									<xsl:when test="$SortColName = 'DueDateLabel'">
										<xsl:copy-of select="$GoalsRecords/Record[DueDateLabel=$GroupBy]"/>
									</xsl:when>
									<xsl:when test="$SortColName = 'Priority'">
										<xsl:copy-of select="$GoalsRecords/Record[Priority=$GroupBy]"/>
									</xsl:when>
									<xsl:when test="$SortColName = 'CompletionPercentage'">
										<xsl:copy-of select="$GoalsRecords/Record[CompletionPercentage=$GroupBy]"/>
									</xsl:when>
									<xsl:otherwise>
										<xsl:copy-of select="$GoalsRecords/Record[Topic=$GroupBy]"/>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:variable>
							<xsl:variable name="GoalCount">
								<xsl:value-of select="count($GoalColumns/Col[Visibility=1])"/>
							</xsl:variable>
							<xsl:for-each select="msxsl:node-set($GetGoalRecordGroupBy)/child::node()">
								<xsl:call-template name="GoalTaskSmall">
									<xsl:with-param name="CurrentBriefRecordRow" select="."></xsl:with-param>
									<xsl:with-param name="GoalIsLand" select="$GoalIsLand"></xsl:with-param>
									<xsl:with-param name="List" select="$List"></xsl:with-param>
									<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
									<xsl:with-param name="itemID" select="$itemID"></xsl:with-param>
									<xsl:with-param name="TargetArea" select="$TargetArea"></xsl:with-param>
								</xsl:call-template>
							</xsl:for-each>
						</xsl:for-each>
					</xsl:when>
					<xsl:otherwise>
						<xsl:for-each select="$GoalsRecords/Record">
							<xsl:call-template name="GoalTaskSmall">
								<xsl:with-param name="CurrentBriefRecordRow" select="."></xsl:with-param>
								<xsl:with-param name="GoalIsLand" select="$GoalIsLand"></xsl:with-param>
								<xsl:with-param name="List" select="$List"></xsl:with-param>
								<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
								<xsl:with-param name="itemID" select="$itemID"></xsl:with-param>
								<xsl:with-param name="TargetArea" select="$TargetArea"></xsl:with-param>
							</xsl:call-template>
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</div>
		</div>


		<!--Tab width table grid end -->
		<!--Paging start here-->
		<xsl:if test="$TotalRec &gt; $PageSize and $PageSize !=-99">
			<div class="publicationSummary">

				<table class="tableMaster" cellpadding="2" cellspacing="0" align="center">
					<tr>
						<td class="verticallyMiddle textCenter" width="1%">
							<xsl:if test="$PageNumber &gt; 1">
								<a href="javascript:void(0);" onClick="LoadGoalTask_3_0('{$itemID}', 'div_Goal_{$itemID}_Operations', '{$SortColName}', '{$SortOrder}', '{$PreviousPageNumber}')">
									<xsl:text>&lt;</xsl:text>
								</a>
							</xsl:if>
						</td>
						<td class="verticallyMiddle textCenter" width="1%">

							<span>Page</span>
						</td>
						<td class="verticallyMiddle textCenter" width="1%">
							<span>
								<xsl:value-of select="$PageNumber"></xsl:value-of>
							</span>
						</td>
						<td class="verticallyMiddle textCenter" width="1%">
							<span>of</span>
						</td>
						<td class="verticallyMiddle textCenter" width="1%">
							<span>
								<xsl:value-of select="$TotalPages"/>
							</span>

						</td>
						<td class="verticallyMiddle textCenter" width="1%">
							<xsl:if test="$PageNumber &lt; $TotalPages">
								<a href="javascript:void(0);" onClick="LoadGoalTask_3_0('{$itemID}', 'div_Goal_{$itemID}_Operations', '{$SortColName}', '{$SortOrder}', '{$NextPageNumber}')">
									<xsl:text>&gt;</xsl:text>
								</a>
							</xsl:if>
						</td>
						<td width="94%">
						</td>
					</tr>
				</table>
			</div>
		</xsl:if>
		<!--Paging end here-->
		<!--<xsl:call-template name="AddTaskAndWorksheetTemplate">
			<xsl:with-param name="Worksheets" select="$Worksheets"></xsl:with-param>
			<xsl:with-param name="itemID" select="$itemID"></xsl:with-param>
			<xsl:with-param name="ItemDetail" select="$ItemDetail"></xsl:with-param>
			<xsl:with-param name="SearchTopic" select="$SearchTopic"></xsl:with-param>
			<xsl:with-param name="ResponsibleColumns" select="$ResponsibleColumns"></xsl:with-param>
			<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
			<xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
			<xsl:with-param name="PermissionID" select="$PermissionID"></xsl:with-param>
			<xsl:with-param name="TaskDisplay" select="'display:inline-block;'"></xsl:with-param>
			<xsl:with-param name="WorskSheetDisplay" select="'display:none;'"></xsl:with-param>
			<xsl:with-param name="ShowTask" select="'Yes'"></xsl:with-param>
			<xsl:with-param name="ShowWorkSheet" select="'Yes'"></xsl:with-param>
			<xsl:with-param name="SelectedUserID" select="$LoggedInUser"></xsl:with-param>
			<xsl:with-param name="TargetArea" select="$TargetArea"></xsl:with-param>
		</xsl:call-template>-->
	</xsl:template>

</xsl:stylesheet>
