﻿<?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="../Reports/UpComingTaskFilter.xslt"/>
	<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>

	<xsl:template match="/">
		<xsl:variable name="MasterPortalItemID" select="AjaxRequest/Params/MasterPortalItemID"></xsl:variable>
		<xsl:variable name="divID" select="AjaxRequest/Params/divID"></xsl:variable>
		<xsl:variable name="LoggedInUserID" select="AjaxRequest/LoggedInUserID"></xsl:variable>
		<xsl:variable name="UpcomingTaskHTML" select="AjaxRequest/UpcomingTaskHTML"></xsl:variable>
		<xsl:variable name="NotificationHTML" select="AjaxRequest/NotificationHTML"></xsl:variable>
		<xsl:variable name="GoalSummaryHTML" select="AjaxRequest/GoalSummaryHTML"></xsl:variable>
		<xsl:variable name="ParentPage" select="AjaxRequest/Params/ParentPage"></xsl:variable>
		<xsl:variable name="CurrentDate" select="AjaxRequest/CurrentDate"></xsl:variable>
		<xsl:variable name="PortalItemID">
			<xsl:choose>
				<xsl:when test="AjaxRequest/Params/PortalItemID=''">
					<xsl:text>-99</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="AjaxRequest/Params/PortalItemID"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="GoalItemID">
			<xsl:choose>
				<xsl:when test="AjaxRequest/Params/GoalItemID=''">
					<xsl:text>-99</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="AjaxRequest/Params/GoalItemID"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="PortalID">
			<xsl:choose>
				<xsl:when test="$PortalItemID=-99">
					<xsl:value-of select="$MasterPortalItemID"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$PortalItemID"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<div>
			<input type="hidden" id="hfdMainActivityDivID" value="{$divID}"></input>
			<div class="col-sm-12 col-md-12 RiteTxt right-section A" style="width:100% !important;background:#ebebed;float:left;">
				<div class="padingrite" id="divActivityDashboardGoalSummary">
					<xsl:value-of select="$GoalSummaryHTML" disable-output-escaping="yes"/>
				</div>
			</div>
			<div class="col-sm-12 col-md-12 RiteTxt A" style="background:#ebebed;float:left;width:100%">
				<div class="padingrite">
					<div class="col-sm-12 col-md-6 mrginbtm box inner light-gray Lt" >
						<div class="section-title" style="padding-bottom:6px;">
							<div class="lftasks">Upcoming Tasks</div>
							<div  class="ritody">
								<xsl:call-template name="UpComingTaskFilter">
									<xsl:with-param name="DisplayDateDiv" select="'divDisplayDate'"></xsl:with-param>
									<xsl:with-param name="GoalItemID" select="$GoalItemID"></xsl:with-param>
									<xsl:with-param name="DivID" select="'divMyUpComingTask'"></xsl:with-param>
									<xsl:with-param name="PageNumber" select="'1'"></xsl:with-param>
									<xsl:with-param name="ResponsibleID" select="$LoggedInUserID"></xsl:with-param>
									<xsl:with-param name="MasterPortalItemID" select="$MasterPortalItemID"></xsl:with-param>
									<xsl:with-param name="PortalItemID" select="$PortalItemID"></xsl:with-param>
									<xsl:with-param name="SuccessKey" select="''"></xsl:with-param>
									<xsl:with-param name="ItemType" select="''"></xsl:with-param>
									<xsl:with-param name="CompletePercentage" select="''"></xsl:with-param>
									<xsl:with-param name="CurrentDate" select="$CurrentDate"></xsl:with-param>
									<xsl:with-param name="SelectedText" select="'Top 10'"></xsl:with-param>
								</xsl:call-template>
							</div>
						</div>
						
						<div class="section-title" style="text-align:center;border:none;" id="divDisplayDate">						
						</div>
						<div class="col-md-12 MyUpcomingDiv" id="divMyUpComingTask" style="background:#fff;">
							<xsl:value-of select="$UpcomingTaskHTML" disable-output-escaping="yes"/>
						</div>
						<div class="onMouseOver" style=" margin: 10px;   width: 95%;   padding: 8px;  text-align: center;    float: left;"
							onclick="loadBasePortalUserTasks_3_0('{$divID}','{$PortalID}','{$LoggedInUserID}','1','Header','1');">
							<a href="javacripit:void()" onclick="return false;" style="font-size:14px; text-decoration:underline;">View All</a>
						</div>
					</div>
					<div class="col-sm-12 col-md-6 mrginbtm box inner At light-gray Rt " style="background:#fff;">
						<div class="section-title">
							<p>Recent Activity</p>
						</div>
						<div class="col-md-12 RecentAct" id="divGoalUserNotification">
							<xsl:value-of select="$NotificationHTML" disable-output-escaping="yes"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</xsl:template>
</xsl:stylesheet>
