Bug 4506: Add volume > set link

A new label 'Set:' is added with a link to the set.
The link starts a search for control number from 773$w in index control number.
A syspref UseControlNumber will be added later, to provide a fallback to a search by 245$a, which is also the title of the set.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
This commit is contained in:
Katrin Fischer 2010-09-26 23:42:07 +02:00 committed by Colin Campbell
parent 43d0860e55
commit bfbf10e8e9
2 changed files with 34 additions and 0 deletions

View File

@ -231,6 +231,23 @@
</a>
</span>
</xsl:if>
<!-- Set -->
<xsl:if test="$leader19='c'">
<span class="results_summary"><span class="label">Set: </span>
<a>
<xsl:choose>
<xsl:when test="$UseControlNumber = '1'">
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:value-of select="marc:datafield[@tag=773]/marc:subfield[@code='w']"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Title:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
</a>
</span>
</xsl:if>
<!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
<xsl:if test="$display880">

View File

@ -250,6 +250,23 @@
</a>
</span>
</xsl:if>
<!-- Set -->
<xsl:if test="$leader19='c'">
<span class="results_summary"><span class="label">Set: </span>
<a>
<xsl:choose>
<xsl:when test="$UseControlNumber = '1'">
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:datafield[@tag=773]/marc:subfield[@code='w']"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
</a>
</span>
</xsl:if>
<!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
<xsl:if test="$display880">