<!--                                                                  -->
<!--  Copyright (C) 2009 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--                                                                  -->
<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="" encoding="utf-8" />

    <xsl:template name="dashboardCatalogSummaryItem">
        <xsl:param name="itemTitle" />
        <xsl:param name="count" />
        <xsl:param name="url" />

        <a href="{$url}" class="Bookdashboard-catalogsummarylink">
            <span class="Bookdashboard-catalogsummary-title"><xsl:value-of select="$itemTitle" /></span>
            <span class="Bookdashboard-catalogsummary-count">
                <xsl:value-of select="$count" />
            </span>
        </a>
    </xsl:template>

    <xsl:template name="dashboardCatalogSummary">
        <xsl:param name="module" />
        <xsl:param name="title" />
        <h2><xsl:value-of select="$title" /></h2>
        <div class="Bookdashboard-catalogsummary-wrapper">

            <xsl:call-template name="dashboardCatalogSummaryItem">
                <xsl:with-param name="itemTitle" select="'Imprints'"/>
                <xsl:with-param name="count" select="$module/ImprintCount"/>
                <xsl:with-param name="url" select="'/bookpub/analytics?c=is'"/>
            </xsl:call-template>

            <xsl:call-template name="dashboardCatalogSummaryItem">
                <xsl:with-param name="itemTitle" select="'Authors'"/>
                <xsl:with-param name="count" select="$module/AuthorCount"/>
                <xsl:with-param name="url" select="'/bookpub/analytics?c=as'"/>
            </xsl:call-template>

            <xsl:call-template name="dashboardCatalogSummaryItem">
                <xsl:with-param name="itemTitle" select="'Books'"/>
                <xsl:with-param name="count" select="$module/BookCount"/>
                <xsl:with-param name="url" select="'/bookpub/analytics?c=bs'"/>
            </xsl:call-template>

        </div>
        <xsl:if test="normalize-space($module/LastUpdate)">
            <p class="Bookdashboard-catalogsummary-help HelpText">Catalog last updated on <xsl:value-of select="$module/LastUpdate" />.</p>
        </xsl:if>
    </xsl:template>

</xsl:stylesheet>
