Browse Source

Bug 15100: MARC21 - make display of "Dates associated with a name" optional

With the changes for RDA now more subfields for the fields
100, 110, 111, and 700, 710, 711 are displayed.
One of them is $d - Dates associated with a name

This patch adds separate treatment of the $d subfield and
wraps it in a span with the class "authordates".
This makes it possible to hide the information with CSS.

To test:
- Make sure you have several records with $d catalogued
- Check the display in result list and detail page
  with and without the page.
- Check, if there is a difference in display
- Check if the dates are correctly wrapped in a span
- Try to hide the information, using the following
  entry in your *UserCSS preferences:
  .authordates { display: none; }

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
new_12478_elasticsearch
Katrin Fischer 9 years ago
committed by Brendan A Gallagher
parent
commit
2f85d659a1
  1. 15
      koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
  2. 10
      koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl
  3. 14
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
  4. 10
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl

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

@ -1192,8 +1192,8 @@
<xsl:with-param name="codes">
<xsl:choose>
<!-- #13383 include subfield e for field 111 -->
<xsl:when test="@tag=111">abcdeqt</xsl:when>
<xsl:otherwise>abcdjqt</xsl:otherwise>
<xsl:when test="@tag=111">abceqt</xsl:when>
<xsl:otherwise>abcjqt</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
@ -1204,11 +1204,11 @@
</xsl:call-template>
</xsl:when>
<!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
<!--#13382 Added all relevant subfields 4, e, are handled separately -->
<!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
<xsl:when test="@tag=700 or @tag=710 or @tag=711">
<xsl:variable name="str">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param>
<xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="chopPunctuation">
@ -1221,7 +1221,12 @@
</xsl:call-template>
</xsl:when>
</xsl:choose>
<xsl:if test="marc:subfield[@code='d']">
<span class="authordates">
<xsl:text> </xsl:text>
<xsl:value-of select="marc:subfield[@code='d']"/>
</span>
</xsl:if>
<!-- add relator code too between brackets-->
<!-- #13383 include relator code j for field 111 -->
<xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">

10
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl

@ -363,8 +363,8 @@
<xsl:with-param name="codes">
<xsl:choose>
<!-- #13383 include subfield e for field 111 -->
<xsl:when test="@tag=111">abcdeqt</xsl:when>
<xsl:otherwise>abcdjqt</xsl:otherwise>
<xsl:when test="@tag=111">abceqt</xsl:when>
<xsl:otherwise>abcjqt</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
@ -374,6 +374,12 @@
</xsl:with-param>
</xsl:call-template>
</a>
<xsl:if test="marc:subfield[@code='d']">
<span class="authordates">
<xsl:text> </xsl:text>
<xsl:value-of select="marc:subfield[@code='d']"/>
</span>
</xsl:if>
<xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
<span class="relatorcode">
<xsl:text> [</xsl:text>

14
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl

@ -1292,8 +1292,8 @@
<xsl:with-param name="codes">
<xsl:choose>
<!-- #13383 include subfield e for field 111 -->
<xsl:when test="@tag=111">abcdeqt</xsl:when>
<xsl:otherwise>abcdjqt</xsl:otherwise>
<xsl:when test="@tag=111">abceqt</xsl:when>
<xsl:otherwise>abcjqt</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
@ -1304,11 +1304,11 @@
</xsl:call-template>
</xsl:when>
<!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
<!--#13382 Added all relevant subfields 4, e, are handled separately -->
<!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
<xsl:when test="@tag=700 or @tag=710 or @tag=711">
<xsl:variable name="str">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param>
<xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="chopPunctuation">
@ -1322,6 +1322,12 @@
</xsl:when>
</xsl:choose>
</span></span></span>
<xsl:if test="marc:subfield[@code='d']">
<span class="authordates">
<xsl:text> </xsl:text>
<xsl:value-of select="marc:subfield[@code='d']"/>
</span>
</xsl:if>
<!-- #13383 include relator code j for field 111 -->
<xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
<span class="relatorcode">

10
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl

@ -469,8 +469,8 @@
<xsl:with-param name="codes">
<xsl:choose>
<!-- #13383 include subfield e for field 111 -->
<xsl:when test="@tag=111">abcdeqt</xsl:when>
<xsl:otherwise>abcdjqt</xsl:otherwise>
<xsl:when test="@tag=111">abceqt</xsl:when>
<xsl:otherwise>abcjqt</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
@ -479,6 +479,12 @@
<xsl:text>:,;/ </xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:if test="marc:subfield[@code='d']">
<span class="authordates">
<xsl:text> </xsl:text>
<xsl:value-of select="marc:subfield[@code='d']"/>
</span>
</xsl:if>
<xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
<span class="relatorcode">
<xsl:text> [</xsl:text>

Loading…
Cancel
Save