Bugzilla – Attachment 148994 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: Display content warnings in OPAC
Bug-31123-Display-content-warnings-in-OPAC.patch (text/plain), 4.16 KB, created by
Nick Clemens (kidclamp)
on 2023-03-30 14:16:35 UTC
(
hide
)
Description:
Bug 31123: Display content warnings in OPAC
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-30 14:16:35 UTC
Size:
4.16 KB
patch
obsolete
>From 3c6914d0e422f707b5eb3dc5d5667dfe22476b01 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 8 Sep 2022 15:11:31 +0100 >Subject: [PATCH] Bug 31123: Display content warnings in OPAC > >This patch adds handling of content warning display to the OPAC for both >detail and search result views > >Test plan >1) Work through the test plan for the previous patch >2) Confirm that the same text now also displays on the equivilent OPAC > pages. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../en/xslt/MARC21slim2OPACDetail.xsl | 21 +++++++++++++++++++ > .../en/xslt/MARC21slim2OPACResults.xsl | 21 +++++++++++++++++++ > 2 files changed, 42 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 34a6e0bbf7..d943359bd5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1299,6 +1299,27 @@ > </span> > </xsl:for-each> > >+ <!-- Content Warning --> >+ <xsl:variable name="ContentWarningField" select="marc:sysprefs/marc:syspref[@name='ContentWarningField']"/> >+ <xsl:if test="marc:datafield[@tag=$ContentWarningField]"> >+ <span class="results_summary content_warning"> >+ <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> >+ <xsl:otherwise> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param> >+ </xsl:call-template> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <!-- 866 textual holdings --> > <xsl:if test="marc:datafield[@tag=866]"> > <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 9e7a16a2bb..7bc534a430 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1159,6 +1159,27 @@ > <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> > </xsl:call-template> > >+ <!-- Content Warning --> >+ <xsl:variable name="ContentWarningField" select="marc:sysprefs/marc:syspref[@name='ContentWarningField']"/> >+ <xsl:if test="marc:datafield[@tag=$ContentWarningField]"> >+ <span class="results_summary content_warning"> >+ <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> >+ <xsl:otherwise> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param> >+ </xsl:call-template> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <xsl:if test="marc:datafield[@tag=856]"> > <div class="results_summary online_resources"> > <span class="label">Online access: </span> >-- >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 31123
:
140345
|
140346
|
140347
|
140356
|
140357
|
140358
|
143880
|
143881
|
143882
|
147342
|
147343
|
147344
|
147345
|
147346
|
148992
|
148993
| 148994 |
148995
|
148996
|
148997