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

    <xsl:template name="productShowDigitalLayout">
        <div class="section">
            <xsl:choose>
                <xsl:when test="Form/ProductDigital">
                    <xsl:call-template name="productDigitalShow" />
                </xsl:when>
                <xsl:otherwise>
                    <xsl:call-template name="productDigitalNone" />
                </xsl:otherwise>
            </xsl:choose>
            <br />
        </div>
    </xsl:template>

    <xsl:template name="productDigitalShow">
        <fieldset>
            <legend>Distribution Settings</legend>
            <div class="insideFieldset">
                <xsl:call-template name="column1DigitalShow" />
                <xsl:call-template name="column2DigitalShow" />
            </div>
        </fieldset>
    </xsl:template>

    <xsl:template name="productDigitalNone">
        <fieldset>
            <legend>Distribution Settings</legend>
            <div class="insideFieldset">
                You have no digital products configured for this album.
            </div>
        </fieldset>
    </xsl:template>

    <xsl:template name="column1DigitalShow">
        <div class="column1">
            <table>
                <tr>
                    <td class="leftCol"><label for="Form_ProductDigital_DistAllow">Distribution Allowed?:</label></td>
                    <td>
                        <xsl:choose>
                            <xsl:when test="Form/ProductDigital/DistAllow = 1">Yes</xsl:when>
                            <xsl:otherwise>No</xsl:otherwise>
                        </xsl:choose>
                    </td>
                </tr>
            </table>
        </div>
    </xsl:template>

    <xsl:template name="column2DigitalShow">
        <div class="column2">
            <table>
                <tr>
                    <td class="leftCol"><label for="Form_ProductDigital_TerritoriesFlag">Territories List Type:</label></td>
                    <td>
                        <xsl:choose>
                            <xsl:when test="Form/ProductDigital/TerritoriesFlag = 'A'">ALLOW</xsl:when>
                            <xsl:otherwise>DENY</xsl:otherwise>
                        </xsl:choose>
                    </td>
                </tr>
                <tr>
                    <td class="leftCol"><label for="Form_ProductDigital_TerritoriesList">Territories List:</label></td>
                    <td>
                        <xsl:value-of select="Form/ProductDigital/TerritoriesList" />
                    </td>
                </tr>
            </table>
        </div>
    </xsl:template>

</xsl:stylesheet>

