<!--                                                                  -->
<!--  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="section" id="auditReport">
    	<xsl:choose>
    		<xsl:when test="Report/Label">
    			<div class="reportNavWrapper">
    				<h2>
    					Labels On Multiple Contracts
    				</h2>
						<xsl:call-template name="reportHeading" />
	    			<xsl:call-template name="reportNav" />
					</div>
		  		<xsl:call-template name="labelsMultipleContractsTable" />
		  		<xsl:call-template name="reportNav" />
					<br class="superBreak" />
					<br />
				</xsl:when>
				<xsl:otherwise>
					<p>No labels on multiple contracts were found.</p>
				</xsl:otherwise>
			</xsl:choose>
		</div>
		
		<xsl:call-template name="backToStatementsHome" />
		
	</xsl:template>

	<xsl:template name="labelsMultipleContractsTable">
    <table class="textChart hiOn">
      <tr>
      	<th>Label</th>
      	<th>Contract&#160;Title</th>
      	<th>Contract&#160;ID</th>
      	<th>Payor</th>
      	<th>Payee</th>
      	<th class="percent">Distribution&#160;Fee</th>
      	<th></th>
      </tr>
      <xsl:for-each select="Report/Label">
        <tr class="row{position() mod 2}">
        	<td><xsl:value-of select="LabelName" /></td>
            <td>
                <a href="/rps/label_contract?LabelContractID={LabelContractID}&amp;c=show">
                    <xsl:value-of select="ContractTitle" />
                </a>
            </td>
            <td><xsl:value-of select="ClientContractID" /></td>
            <td><xsl:value-of select="PayorName" /></td>
            <td>
                <a href="/rps/label_payee?LabelPayeeID={PayeeID}&amp;c=show">
                    <xsl:value-of select="PayeeName" />
                </a>
            </td>
            <td class="percent"><xsl:value-of select="DistFee" />%</td>            
			<td>
				<a href="/rps/catalog?c=list&amp;label={LabelID}">View Albums</a>
			</td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>

</xsl:stylesheet>
