Bug 15140: Add MARC21 776 to OPAC and staff display
Adds code to opac and staff detail XSLT in order to show 776$t (or $a) and a link based on 776$w (record control number). $w should be in the form: (MARCOrgCode)Record-number For instance: (NL-AmRIJ)12345 Note: You should have enabled default opac/intranet XSLT view. Test plan: [1] Add two 776s (one with $t and $w and one with $t only) [2] Verify that you see "Additional physical formats" on opac-detail. Does the link for $w work? [3] Check intranet detail too. [4] Empty 776$t and put text in $a. Check detail page again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
6d8b26b01f
commit
7b7ffef53d
2 changed files with 86 additions and 0 deletions
|
@ -753,6 +753,49 @@
|
|||
</span>
|
||||
</xsl:if>
|
||||
|
||||
<!-- MARC21 776 Additional Physical Form Entry -->
|
||||
<xsl:if test="marc:datafield[@tag=776]">
|
||||
<span class="results_summary add_physical_form">
|
||||
<span class="label">Additional physical formats: </span>
|
||||
<xsl:for-each select="marc:datafield[@tag=776]">
|
||||
<xsl:variable name="linktext">
|
||||
<xsl:choose>
|
||||
<xsl:when test="marc:subfield[@code='t']">
|
||||
<xsl:value-of select="marc:subfield[@code='t']"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="marc:subfield[@code='a']">
|
||||
<xsl:value-of select="marc:subfield[@code='a']"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>No title</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="marc:subfield[@code='w']">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:text>/cgi-bin/koha/catalogue/search.pl?q=Control-number:</xsl:text>
|
||||
<xsl:call-template name="extractControlNumber">
|
||||
<xsl:with-param name="subfieldW">
|
||||
<xsl:value-of select="marc:subfield[@code='w']"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="$linktext"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$linktext"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>; </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</span>
|
||||
</xsl:if>
|
||||
|
||||
<!-- DDC classification -->
|
||||
<xsl:if test="marc:datafield[@tag=082]">
|
||||
<span class="results_summary ddc">
|
||||
|
|
|
@ -805,6 +805,49 @@
|
|||
</span>
|
||||
</xsl:if>
|
||||
|
||||
<!-- MARC21 776 Additional Physical Form Entry -->
|
||||
<xsl:if test="marc:datafield[@tag=776]">
|
||||
<span class="results_summary add_physical_form">
|
||||
<span class="label">Additional physical formats: </span>
|
||||
<xsl:for-each select="marc:datafield[@tag=776]">
|
||||
<xsl:variable name="linktext">
|
||||
<xsl:choose>
|
||||
<xsl:when test="marc:subfield[@code='t']">
|
||||
<xsl:value-of select="marc:subfield[@code='t']"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="marc:subfield[@code='a']">
|
||||
<xsl:value-of select="marc:subfield[@code='a']"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>No title</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="marc:subfield[@code='w']">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:text>/cgi-bin/koha/opac-search.pl?q=Control-number:</xsl:text>
|
||||
<xsl:call-template name="extractControlNumber">
|
||||
<xsl:with-param name="subfieldW">
|
||||
<xsl:value-of select="marc:subfield[@code='w']"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="$linktext"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$linktext"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>; </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</span>
|
||||
</xsl:if>
|
||||
|
||||
<!-- DDC classification -->
|
||||
<xsl:if test="marc:datafield[@tag=082]">
|
||||
<span class="results_summary ddc">
|
||||
|
|
Loading…
Reference in a new issue