Bug 34020: Add spans to subfields

The 260 field has spans for each subfield, we should provide the same
for 264

To test:
1 - Apply patch
2 - Inspect the record 264 display on staff and opac, results and
    details
3 - Confirm spans are constructed correctly and named sensibly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-10-18 12:21:30 +00:00 committed by Tomas Cohen Arazi
parent 1349fc60da
commit d8420e42b7
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 50 additions and 34 deletions

View file

@ -283,27 +283,35 @@
<xsl:for-each select="marc:subfield">
<xsl:if test="@code='a'">
<xsl:value-of select="current()"/>
<span class="rda264_place" property="location">
<xsl:value-of select="current()"/>
</span>
</xsl:if>
<xsl:if test="@code='b'">
<xsl:choose>
<xsl:when test="$url='1'">
<a>
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
<xsl:value-of select="current()"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="current()"/>
</xsl:otherwise>
</xsl:choose>
<span property="rda264_name" typeof="Organization">
<span property="name" class="rda264_name">
<xsl:choose>
<xsl:when test="$url='1'">
<a>
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
<xsl:value-of select="current()"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="current()"/>
</xsl:otherwise>
</xsl:choose>
</span>
</span>
</xsl:if>
<xsl:if test="@code='c'">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:value-of select="current()"/>
</xsl:with-param>
</xsl:call-template>
<span property="date" class="rda264_date">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:value-of select="current()"/>
</xsl:with-param>
</xsl:call-template>
</span>
</xsl:if>
<xsl:if test="position() != last()">
<xsl:text> </xsl:text>

View file

@ -281,27 +281,35 @@
<xsl:for-each select="marc:subfield">
<xsl:if test="@code='a'">
<xsl:value-of select="current()"/>
<span class="rda264_place" property="location">
<xsl:value-of select="current()"/>
</span>
</xsl:if>
<xsl:if test="@code='b'">
<xsl:choose>
<xsl:when test="$url='1'">
<a>
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
<xsl:value-of select="current()"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="current()"/>
</xsl:otherwise>
</xsl:choose>
<span property="rda264_name" typeof="Organization">
<span property="name" class="rda264_name">
<xsl:choose>
<xsl:when test="$url='1'">
<a>
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
<xsl:value-of select="current()"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="current()"/>
</xsl:otherwise>
</xsl:choose>
</span>
</span>
</xsl:if>
<xsl:if test="@code='c'">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:value-of select="current()"/>
</xsl:with-param>
</xsl:call-template>
<span property="date" class="rda264_date">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:value-of select="current()"/>
</xsl:with-param>
</xsl:call-template>
</span>
</xsl:if>
<xsl:if test="position() != last()">
<xsl:text> </xsl:text>