<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:include href="/app/tools/support/templates/layout.xsl" />

  <xsl:template name="mainBody" >
    <xsl:call-template name="bodyTitle" >
      <xsl:with-param name="title">Labels Without Contracts Report</xsl:with-param>
    </xsl:call-template>

    <xsl:call-template name="displayCriteria" />
    <xsl:if test="IsSubmit &gt; 0">
      <xsl:call-template name="displayResults" />
    </xsl:if>
  </xsl:template>


  <xsl:template name="displayCriteria" >
    <fieldset>
    <form action="/support/reports" method="get">
      <input type="hidden" name="c" value="{/Root/Cmd}" />
      <table>
        <tr>
          <th>Client</th>
          <th>Page Size</th>
          <th></th>
        </tr>

        <tr>

          <xsl:call-template name="listField" >
            <xsl:with-param name="name">client</xsl:with-param>
            <xsl:with-param name="value" select = "Params/client" />
            <xsl:with-param name="empty_label">All</xsl:with-param>
            <xsl:with-param name="options" >
              <xsl:for-each select="Clients/Client" >
                <option name="{ClientID}"><xsl:value-of select="ClientName" /></option>
              </xsl:for-each>
            </xsl:with-param>
          </xsl:call-template>

          <xsl:call-template name="listField" >
            <xsl:with-param name="name">limit</xsl:with-param>
            <xsl:with-param name="value" select = "Params/limit" />
            <xsl:with-param name="options" >
              <option name="25">25</option>
              <option name="50">50</option>
              <option name="100">100</option>
              <option name="250">250</option>
            </xsl:with-param>
          </xsl:call-template>

          <td>
            <xsl:call-template name="submitButton" >
              <xsl:with-param name="name">submit</xsl:with-param>
              <xsl:with-param name="label">Update</xsl:with-param>
            </xsl:call-template>
          </td>
        </tr>
      </table>
    </form>
    </fieldset>
  </xsl:template>

  <xsl:template name="displayResults" >

    <fieldset>

      <xsl:call-template name="collectionList" >
        <xsl:with-param name="columns" >
          <Column align="left" field="client">Client</Column>
          <Column align="left" field="client_id">Client ID</Column>
          <Column align="left" field="label_id">Label ID</Column>
          <Column align="left" field="label_name">Name</Column>
        </xsl:with-param>
        <xsl:with-param name="keyField">label_id</xsl:with-param>
      </xsl:call-template>

    </fieldset>
  </xsl:template>
</xsl:stylesheet>
