<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <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/bookpub/templates/global.xsl" />
    <xsl:include href="book_detail.xsl" />

    <xsl:variable name="productMonitoring">
        <xsl:choose>
            <xsl:when test="/Root/ClientTypes/ClientType[ClientTypeID = 10]/IsClientTypeFlag = 1">1</xsl:when>
            <xsl:otherwise>0</xsl:otherwise>
        </xsl:choose>
    </xsl:variable>


    <xsl:template name="pickLayout">
        <div class="Album-information">
            <xsl:call-template name="helpLink" />
            <xsl:call-template name="successMessageGeneral">
                <xsl:with-param name="successMessage">Book successfully updated!</xsl:with-param>
            </xsl:call-template>
            <xsl:call-template name="bookDetailView">
                <xsl:with-param name="path" select="/Root/Book"></xsl:with-param>
            </xsl:call-template>
            <xsl:if test="$productMonitoring = 1">
                <xsl:call-template name="bookChart" />
            </xsl:if>
            <xsl:call-template name="productListView" />
            <div class="Album-last-modified">
                <xsl:call-template name="lastModifiedCell">
                    <xsl:with-param name="path" select="/Root/Book"></xsl:with-param>
                </xsl:call-template>
            </div>
        </div>
    </xsl:template>

    <xsl:template name="bookChart">
        <div id="chartWrapper" class="Bookchart-wrapper js-rs-html-content">
            <xsl:call-template name="loader" />
        </div>
        <script type="text/javascript">
            var requestURL = "/bookpub/catalog?c=show_chart&amp;BookID=<xsl:value-of select="Book/BookID" />";
            ajaxReplaceContent(requestURL, "chartWrapper" );
        </script>
    </xsl:template>

</xsl:stylesheet>
