Browse Source

Bug 14304: RDA: Intranet display link in XSLT for 264 field to reflect Zebra indexing

This patch add display link in XSLT for 264 for bug 14198 and reflect the
Zebra indexing 'Provider' in detail page for Intranet.

Test plan
1) Update zebra index if no Provider: index exist
2) Do a search by Provider:
3) Goto detail page for a record with 264
4) Look that there no display link for 264 field.
5) Apply the patch
6) Reload the page, notice about the link, click the link an confirm
   the new index Provider works fine
7) Test with multiple records with 260 and 264, if you prefer follow test plan
   for bug 14734
8) Access an RCAA2 record just with 260 field
9) Notice that 260 has been updated with Provider index too.
NOTE: The intention of Provider index -according with documentation- is
to collect multiples fields including 260, 264, 270, and 257

Sponsored-by: Universidad de El Salvador

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
new_12478_elasticsearch
Hector Castro 8 years ago
committed by Brendan Gallagher
parent
commit
2f0fc5f45a
  1. 6
      koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
  2. 40
      koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl

6
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl

@ -314,7 +314,9 @@
<!-- Publisher info and RDA related info from tags 260, 264 -->
<xsl:choose>
<xsl:when test="marc:datafield[@tag=264]">
<xsl:call-template name="showRDAtag264"/>
<xsl:call-template name="showRDAtag264">
<xsl:with-param name="show_url">1</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="marc:datafield[@tag=260]">
<span class="results_summary publisher"><span class="label">Publisher: </span>
@ -326,7 +328,7 @@
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="marc:subfield[@code='b']">
<a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
<a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>

40
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl

@ -218,11 +218,13 @@
The preferred tag is saved in the fav variable and passed to a
helper named-template -->
<!-- Amended to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record) -->
<xsl:param name="show_url"/>
<xsl:choose>
<xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
<xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
<xsl:call-template name="showRDAtag264helper">
<xsl:with-param name="field" select="."/>
<xsl:with-param name="url" select="$show_url"/>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
@ -230,6 +232,7 @@
<xsl:for-each select="marc:datafield[@tag=264]">
<xsl:call-template name="showRDAtag264helper">
<xsl:with-param name="field" select="."/>
<xsl:with-param name="url" select="$show_url"/>
</xsl:call-template>
</xsl:for-each>
</xsl:otherwise>
@ -237,6 +240,7 @@
</xsl:template>
<xsl:template name="showRDAtag264helper">
<xsl:param name="field"/>
<xsl:param name="url"/>
<xsl:variable name="ind2" select="$field/@ind2"/>
<span class="results_summary">
<xsl:choose>
@ -256,9 +260,41 @@
<span class="label">Copyright date: </span>
</xsl:when>
</xsl:choose>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abc</xsl:with-param>
<xsl:if test="$field/marc:subfield[@code='a']">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="$url='1'">
<xsl:if test="$field/marc:subfield[@code='b']">
<a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{$field/marc:subfield[@code='b']}">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</a>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$field/marc:subfield[@code='b']">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">c</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</span>
</xsl:template>

Loading…
Cancel
Save