Bugzilla – Attachment 147345 Details for
Bug 31123
Add a simple way to add 'Harmful content warnings' to catalogue records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31123: Update Staff XSLT to include all subfields
Bug-31123-Update-Staff-XSLT-to-include-all-subfiel.patch (text/plain), 5.47 KB, created by
Martin Renvoize (ashimema)
on 2023-02-24 15:43:44 UTC
(
hide
)
Description:
Bug 31123: Update Staff XSLT to include all subfields
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-02-24 15:43:44 UTC
Size:
5.47 KB
patch
obsolete
>From 5b23e591ab91e40f4683389d0c6127fad0d193bf Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 24 Feb 2023 15:36:00 +0000 >Subject: [PATCH] Bug 31123: Update Staff XSLT to include all subfields > >This patch updates the XSLT sheets to include all subfields in your >selected ContentWarningField in display and handles converting the >subfield u if present to a hyperlink. >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 28 ++++++++++++++----- > .../en/xslt/MARC21slim2intranetResults.xsl | 28 ++++++++++++++----- > 2 files changed, 42 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 9151496e24..713de7b1c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1076,15 +1076,29 @@ > <span class="label">Content warning: </span> > <xsl:for-each select="marc:datafield[@tag=$ContentWarningField]"> > <xsl:choose> >- <xsl:when test="marc:subfield[@code='z']"> >- <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text> >+ <xsl:when test="marc:subfield[@code='u']"> >+ <a> >+ <xsl:attribute name="href"> >+ <xsl:value-of select="marc:subfield[@code='u']"/> >+ </xsl:attribute> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='a']"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="marc:subfield[@code='u']"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> >+ <xsl:text> </xsl:text> >+ </xsl:when> >+ <xsl:when test="not(marc:subfield[@code='u']) and marc:subfield[@code='a']"> >+ <xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text> > </xsl:when> >- <xsl:otherwise> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param> >- </xsl:call-template> >- </xsl:otherwise> > </xsl:choose> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">bcdefghijklmnopqrstvwxyz</xsl:with-param> >+ </xsl:call-template> > <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 12f069d23f..da3d8839aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -1014,15 +1014,29 @@ > <span class="label">Content warning: </span> > <xsl:for-each select="marc:datafield[@tag=$ContentWarningField]"> > <xsl:choose> >- <xsl:when test="marc:subfield[@code='z']"> >- <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text> >+ <xsl:when test="marc:subfield[@code='u']"> >+ <a> >+ <xsl:attribute name="href"> >+ <xsl:value-of select="marc:subfield[@code='u']"/> >+ </xsl:attribute> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='a']"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="marc:subfield[@code='u']"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </a> >+ <xsl:text> </xsl:text> >+ </xsl:when> >+ <xsl:when test="not(marc:subfield[@code='u']) and marc:subfield[@code='a']"> >+ <xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text> > </xsl:when> >- <xsl:otherwise> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param> >- </xsl:call-template> >- </xsl:otherwise> > </xsl:choose> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param> >+ </xsl:call-template> > <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if> > </xsl:for-each> > </span> >-- >2.39.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 31123
:
140345
|
140346
|
140347
|
140356
|
140357
|
140358
|
143880
|
143881
|
143882
|
147342
|
147343
|
147344
|
147345
|
147346
|
148992
|
148993
|
148994
|
148995
|
148996
|
148997