<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="no" doctype-system="" encoding="utf-8" />

    <xsl:include href="/app/tools/rps/templates/global.xsl" />
    <xsl:include href="../shared_layouts/statements.xsl" />


    <xsl:template name="pickLayout">
        <div class="MainBaseSection">
            <xsl:call-template name="payorTable" />
        </div>
    </xsl:template>

    <xsl:template name="payorTable">
        <table class="Table Table-with-highlight">
            <thead>
                <tr class="Table-row Table-row-header">
                    <th class="Table-col">Payor</th>
                    <th class="Table-col"># of Statements</th>
                </tr>
            </thead>
            <tbody>
                <xsl:for-each select="MechanicalPayorList/Payor">
                    <tr class="Table-row Table-row-data">
                        <td class="Table-col">
                            <a>
                                <xsl:attribute name="href">
                                    <xsl:choose>
                                        <xsl:when test="/Root/Params/Payments">
                                            ?c=editpay&amp;MechanicalRunID=<xsl:value-of select="/Root/Params/MechanicalRunID" />&amp;PayorID=<xsl:value-of select="PayorID" />
                                        </xsl:when>
                                        <xsl:otherwise>
                                            ?c=show&amp;MechanicalRunID=<xsl:value-of select="/Root/Params/MechanicalRunID" />&amp;PayorID=<xsl:value-of select="PayorID" />
                                        </xsl:otherwise>
                                    </xsl:choose>
                                </xsl:attribute>
                                <xsl:value-of select="Name" />
                            </a>
                        </td>
                        <td class="Table-col">
                            <xsl:value-of select="NumStatements" />
                        </td>
                    </tr>
                </xsl:for-each>
            </tbody>
        </table>
    </xsl:template>

</xsl:stylesheet>

