﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template name="TaskFilter">
    <xsl:param name ="Current" select="'N/A'"></xsl:param>
    <xsl:param name ="Completed" select="'N/A'"></xsl:param>
    <xsl:param name ="Future" select="'N/A'"></xsl:param>
    <xsl:param name ="MyItems" select="'N/A'"></xsl:param>
    <xsl:param name ="Others" select="'N/A'"></xsl:param>
    <xsl:param name ="GoalItemID" select="'N/A'"></xsl:param>
    <table class="tableMaster" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td>
          <!--<asp:Label ID="lblShow" Text="Show:" CssClass="taskFilter" runat="server"></asp:Label>-->
          <span id="lblShow" class="taskFilter">
            Show:
          </span>
          <xsl:if test ="$Current = 1">
            <input type="checkbox" id="chkCurrentItem" value="Current" checked="checked" class="taskFilter"
                onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Current</span>
          </xsl:if>
          <xsl:if test ="$Current != 1">
            <input type="checkbox" id="chkCurrentItem" value="Current" class="taskFilter"
                onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Current</span>
          </xsl:if>

          <xsl:if test ="$Future = 1">
            <input type="checkbox" id="chkFutureItem" value="Future" checked="checked" class="taskFilter"
                   onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Future</span>
          </xsl:if>
          <xsl:if test ="$Future != 1">
            <input type="checkbox" id="chkFutureItem" value="Future" class="taskFilter"
                   onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Future</span>
          </xsl:if>

          <xsl:if test ="$Completed = 1">
            <input type="checkbox" id="chkCompletedItem" value="Completed" class="taskFilter" checked="checked"
                  onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Completed</span>
          </xsl:if>
          <xsl:if test ="$Completed != 1">
            <input type="checkbox" id="chkCompletedItem" value="Completed" class="taskFilter"
                  onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Completed</span>
          </xsl:if>

          <xsl:if test ="$MyItems = 1">
            <input type="checkbox" id="chkMyItems" value="My Items" checked="checked" class="taskFilter"
                  onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">My Items</span>
          </xsl:if>
          <xsl:if test ="$MyItems != 1">
            <input type="checkbox" id="chkMyItems" value="My Items" class="taskFilter"
                  onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">My Items</span>
          </xsl:if>

          <xsl:if test ="$Others = 1">
            <input type="checkbox" id="chkOtherItems" value="Other's Items" class="taskFilter" checked="checked"
                  onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Other's Items</span>
          </xsl:if>
          <xsl:if test ="$Others != 1">
            <input type="checkbox" id="chkOtherItems" value="Other's Items" class="taskFilter"
                  onclick="saveSettings('chkCurrentItem', 'chkFutureItem', 'chkCompletedItem', 'chkMyItems', 'chkOtherItems', '{$GoalItemID}','-99'); goal_GoalDetailFilterVersion();" />
            <span class="taskFilter">Other's Items</span>
          </xsl:if>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
