From fff5ec138fc29bdb35f84593d963f437f3d92efe Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 20 Mar 2024 16:04:14 +0100 Subject: [PATCH] Bug 36370: Add ContentWarningField to UNIMARC XSLT Bug 31123 added new feature with preference ContentWarningField. Add this behavior to UNMARC XSLT files. This patch adds new template 'tag_content_warning' in UNIMARCslimUtils.xsl called in results and details pages. New field is placed after 3xx. Test plan (in both interfaces OPAC and staff): 1) Create a new field 599 in framework 2) Set system preference ContentWarningField to 599 3) Edit a record to add a 599 with text in $a$b and an URL in $u 4) Perform a search to find this record => Check you see content_warning: $a $b 5) Click on details page => Check you see content_warning: $a $b Signed-off-by: David Nind --- .../en/xslt/UNIMARCslim2intranetDetail.xsl | 6 ++++ .../en/xslt/UNIMARCslim2intranetResults.xsl | 6 ++++ .../prog/en/xslt/UNIMARCslimUtils.xsl | 36 +++++++++++++++++++ .../en/xslt/UNIMARCslim2OPACDetail.xsl | 6 ++++ .../en/xslt/UNIMARCslim2OPACResults.xsl | 6 ++++ .../bootstrap/en/xslt/UNIMARCslimUtils.xsl | 36 +++++++++++++++++++ 6 files changed, 96 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 25a8d08dee..982bea8b8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -16,6 +16,7 @@ + @@ -306,6 +307,11 @@ + + + + + SUDOC serial history: diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl index 624603c620..8fdabd47ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl @@ -18,6 +18,7 @@ + @@ -77,5 +78,10 @@ + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index 8860317cbf..e344fdf7de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -485,4 +485,40 @@ + + + + + Content warning: + + + + + + + + + + + + + + + + + + + + + + + + bcdefghijklmnopqrstvwxyz + + | + + + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl index f2bebe101f..0992550b1a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -22,6 +22,7 @@ + @@ -347,6 +348,11 @@ + + + + + SUDOC serial history: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl index b9d36a2d35..51e37782e1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl @@ -31,6 +31,7 @@ + @@ -155,6 +156,11 @@ + + + + + Availability: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl index dc02e6fc8e..d30304b150 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl @@ -545,4 +545,40 @@ + + + + + Content warning: + + + + + + + + + + + + + + + + + + + + + + + + bcdefghijklmnopqrstvwxyz + + | + + + + + -- 2.30.2