Bugzilla – Attachment 157308 Details for
Bug 34020
Sequence of MARC 264 subfields different on XSLT result list and detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34020: Add spans to subfields
Bug-34020-Add-spans-to-subfields.patch (text/plain), 6.94 KB, created by
Nick Clemens (kidclamp)
on 2023-10-18 12:34:19 UTC
(
hide
)
Description:
Bug 34020: Add spans to subfields
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-10-18 12:34:19 UTC
Size:
6.94 KB
patch
obsolete
>From d9fa6245970de0fa3b883447da9e3cef01445ba2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Oct 2023 12:21:30 +0000 >Subject: [PATCH] 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 >--- > .../prog/en/xslt/MARC21slimUtils.xsl | 42 +++++++++++-------- > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 42 +++++++++++-------- > 2 files changed, 50 insertions(+), 34 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 5da84927a0..8bb863237b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -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> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index 62465adf27..386e304742 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -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> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34020
:
157307
|
157308
|
157313
|
157314
|
157317
|
157318
|
157319