<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:template name="labelsMultipleContractsLayout">
        <div class="AuditReport" id="auditReport">
            <h2 class="AuditReport-header">
                Labels On Multiple Contracts
            </h2>
            <xsl:choose>
                <xsl:when test="Report/Label">

                    <xsl:call-template name="reportHeading" />
                    <xsl:call-template name="labelsMultipleContractsTable" />
                    <xsl:call-template name="reportFooter" />
                </xsl:when>
                <xsl:otherwise>
                    <section class="Table-empty-results">
                        <p>No labels on multiple contracts were found.</p>
                    </section>
                </xsl:otherwise>
            </xsl:choose>
            <xsl:call-template name="backToStatementsHome" />
        </div>
    </xsl:template>

    <xsl:template name="labelsMultipleContractsTable">
        <table class="Table Table-with-highlight">
            <thead>
                <tr class="Table-row Table-row-header">
                    <th class="Table-col">Label</th>
                    <th class="Table-col">Contract&#160;Title</th>
                    <th class="Table-col">Contract&#160;ID</th>
                    <th class="Table-col">Payor</th>
                    <th class="Table-col">Payee</th>
                    <th class="Table-col">Distribution&#160;Fee</th>
                    <th class="Table-col"></th>
                </tr>
            </thead>
            <tbody>
                <xsl:for-each select="Report/Label">
                    <tr class="Table-row Table-row-data">
                        <td class="Table-col"><xsl:value-of select="LabelName" /></td>
                        <td class="Table-col">
                            <a href="/rps/label_contract?LabelContractID={LabelContractID}&amp;c=show">
                                <xsl:value-of select="ContractTitle" />
                            </a>
                        </td>
                        <td class="Table-col"><xsl:value-of select="ClientContractID" /></td>
                        <td class="Table-col"><xsl:value-of select="PayorName" /></td>
                        <td class="Table-col">
                            <a href="/rps/label_payee?LabelPayeeID={PayeeID}&amp;c=show">
                                <xsl:value-of select="PayeeName" />
                            </a>
                        </td>
                        <td class="Table-col"><xsl:value-of select="DistFee" />%</td>
                        <td class="Table-col">
                            <a href="/rps/catalog?c=list&amp;label={LabelID}">View Albums</a>
                        </td>
                    </tr>
                </xsl:for-each>
            </tbody>
        </table>
    </xsl:template>

</xsl:stylesheet>
