<!--                                                                  -->
<!--  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:output method="html" indent="no" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 4.01//EN" encoding="utf-8" />

  <xsl:include href="/app/tools/rps/templates/global.xsl" />
  <xsl:include href="edit.xsl" />
  <xsl:include href="show.xsl" />

  <xsl:template name="pickLayout">
    <xsl:if test="$cmd = 'edit'">
      <xsl:call-template name="cCompEditLayout" />
    </xsl:if>
    <xsl:if test="$cmd = 'show'">
      <xsl:call-template name="cCompShowLayout" />
    </xsl:if>
  </xsl:template>


  <xsl:template name="submitButton">
      <xsl:choose>
        <xsl:when test="$cmd = 'edit'">
          <input name="submit" type="submit" id="submitButton">
            <xsl:attribute name="value">
              <xsl:if test="normalize-space(Form/ControlledComposition/ControlledCompositionID)">Update</xsl:if>
              <xsl:if test="not(normalize-space(Form/ControlledComposition/ControlledCompositionID))">Create</xsl:if>
            </xsl:attribute>
            <xsl:if test="$lockedRecord = 1">
                <xsl:attribute name="disabled">disabled</xsl:attribute>
            </xsl:if>
          </input>
        </xsl:when>
        <xsl:when test="$cmd = 'show'">
          <input type="button" value="Edit" onClick="javascript:location.href='ccomp?CCompID={Form/ArtistContract/ControlledComposition/ControlledCompositionID}&amp;c=edit'" />
        </xsl:when>
      </xsl:choose>
  </xsl:template>

  <xsl:template name="cancelButton">
    <input type="button" name="Cancel" value="Return to Contract" onClick="location.href='artist_contract?ArtistContractID={Form/ArtistContract/ArtistContractID}&amp;c=show'" />
  </xsl:template>


</xsl:stylesheet>

