Bugzilla – Attachment 112589 Details for
Bug 26825
Add span for publication date in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26825: Add span for publication date in OPAC
Bug-26825-Add-span-for-publication-date-in-OPAC.patch (text/plain), 7.75 KB, created by
ByWater Sandboxes
on 2020-10-27 18:56:21 UTC
(
hide
)
Description:
Bug 26825: Add span for publication date in OPAC
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-10-27 18:56:21 UTC
Size:
7.75 KB
patch
obsolete
>From ed6026fabcf4f9b3f940f82607117393c8ddc9ca Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 27 Oct 2020 15:02:43 +0000 >Subject: [PATCH] Bug 26825: Add span for publication date in OPAC > >This patch modifies the XSL templates for OPAC results and OPAC details >so that the parts of the publisher details are wrapped separate <span>s: >Publisher place, name, and date. > >To test, apply the patch "restart_all" if necessary. > >You can add this to the OPACUserCSS system preference to better see the >change: > >.publisher_place { color: red; } >.publisher_name { color: green; } >.publisher_date { color: orange; } > >- Peform a search in the OPAC >- In the search results, confirm that the publisher plac, name, and date > are wrapped in separate <span>s, either by confirming the custom > colors or by inspecting the source. >- View the details for one of the results. Confirm that the same change > has been made to the detail page. > >Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov> >--- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 40 ++++++++++++---------- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 30 +++++++++------- > 2 files changed, 39 insertions(+), 31 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 8f50ad5fa6..f768671aab 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -313,32 +313,34 @@ > <xsl:for-each select="marc:datafield[@tag=260]"> > <span property="publisher" typeof="Organization"> > <xsl:if test="marc:subfield[@code='a']"> >- <span property="location"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- </span> >+ <span class="publisher_place" property="location"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a</xsl:with-param> >+ </xsl:call-template> >+ </span> > </xsl:if> > <xsl:text> </xsl:text> > <xsl:if test="marc:subfield[@code='b']"> >- <span property="name"><a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/></xsl:attribute> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">b</xsl:with-param> >- </xsl:call-template> >- </a></span> >+ <span property="name" class="publisher_name"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/></xsl:attribute> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">b</xsl:with-param> >+ </xsl:call-template> >+ </a> >+ </span> > </xsl:if> > </span> > <xsl:text> </xsl:text> > <xsl:if test="marc:subfield[@code='c' or @code='g']"> >- <span property="datePublished"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">cg</xsl:with-param> >- </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >- </span> >+ <span property="datePublished" class="publisher_date"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cg</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> > </xsl:if> > <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 1d0d4733e8..cb74d0ad69 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1054,24 +1054,30 @@ > <span class="results_summary publisher"><span class="label">Publication details: </span> > <xsl:for-each select="marc:datafield[@tag=260]"> > <xsl:if test="marc:subfield[@code='a']"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >+ <span class="publisher_place" property="location"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a</xsl:with-param> >+ </xsl:call-template> >+ </span> > </xsl:if> > <xsl:text> </xsl:text> > <xsl:if test="marc:subfield[@code='b']"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">b</xsl:with-param> >- </xsl:call-template> >+ <span property="name" class="publisher_name"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">b</xsl:with-param> >+ </xsl:call-template> >+ </span> > </xsl:if> > <xsl:text> </xsl:text> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">cg</xsl:with-param> >+ <span property="datePublished" class="publisher_date"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cg</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> > </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >+ </span> > <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > <xsl:if test="marc:datafield[@tag=264]"> >-- >2.11.0
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 26825
:
112580
|
112589
|
112701