Bugzilla – Attachment 133235 Details for
Bug 30430
UNIMARC XSLT : displaying field B_214
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30430: UNIMARC XSLT add field B214 display
Bug-30430-UNIMARC-XSLT-add-field-B214-display.patch (text/plain), 5.98 KB, created by
François Pichenot
on 2022-04-13 11:32:03 UTC
(
hide
)
Description:
Bug 30430: UNIMARC XSLT add field B214 display
Filename:
MIME Type:
Creator:
François Pichenot
Created:
2022-04-13 11:32:03 UTC
Size:
5.98 KB
patch
obsolete
>From 6884eb3b71d5794039abeb09b9a07bf7114e74b9 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fran=C3=A7ois=20Pichenot?= <fpichenot@ville-roubaix.fr> >Date: Wed, 13 Apr 2022 13:20:11 +0200 >Subject: [PATCH] Bug 30430: UNIMARC XSLT add field B214 display > >test plan : >- Apply patch >- Find a record with a B214 >- Check on both Opac-Details and Opac-Result that the field is > displayed. >- Do the same checks on catalogue/search results and catalogue/details > in Staff interface. >--- > .../en/xslt/UNIMARCslim2intranetDetail.xsl | 8 +++- > .../prog/en/xslt/UNIMARCslimUtils.xsl | 39 +++++++++++++++++++ > .../en/xslt/UNIMARCslim2OPACDetail.xsl | 6 +++ > .../bootstrap/en/xslt/UNIMARCslimUtils.xsl | 37 ++++++++++++++++++ > 4 files changed, 89 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >index 2e85bcc17d..0033ca28e7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >@@ -127,7 +127,13 @@ > > <xsl:if test="(marc:datafield[@tag=214] or marc:datafield[@tag=210])"> > <xsl:choose> >- <xsl:when test="(marc:datafield[@tag=214] and marc:datafield[@tag=210])"> >+ <xsl:when test="(marc:datafield[@tag=214]/marc:subfield[@code='r'])"> >+ <xsl:call-template name="tag_214_r" /> >+ </xsl:when> >+ <xsl:when test="(marc:datafield[@tag=214]/marc:subfield[@code='s'])"> >+ <xsl:call-template name="tag_214_s" /> >+ </xsl:when> >+ <xsl:when test="(marc:datafield[@tag=214] and marc:datafield[@tag=210])"> > <xsl:call-template name="tag_214" /> > </xsl:when> > <xsl:when test="(marc:datafield[@tag=214])"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl >index ddf4827078..bb0cf0bba3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl >@@ -319,6 +319,45 @@ > </xsl:if> > </span> > </xsl:template> >+ >+ <xsl:template name="tag_214_s"> >+ <xsl:if test="marc:datafield[@tag=214]/marc:subfield[@code='s']"> >+ <span class="results_summary tag_214_s"> >+ <span class="label">Printing and/or Publishing Information Transcribed as Found in the Colophon: </span> >+ <xsl:for-each select="marc:datafield[@tag=214]"> >+ <xsl:value-of select="marc:subfield[@code='s']"/> >+ <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> >+ </span> >+ </xsl:if> >+ </xsl:template> >+ >+ <xsl:template name="tag_214_r"> >+ <xsl:if test="marc:datafield[@tag=214]/marc:subfield[@code='r']"> >+ <span class="results_summary tag_214_r"> >+ <span class="label">Printing and/or Publishing Information Transcribed as Found in the Main Source of >+Information: </span> >+ <xsl:for-each select="marc:datafield[@tag=214]"> >+ <xsl:value-of select="marc:subfield[@code='r']"/> >+ <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> >+ </span> >+ </xsl:if> >+ </xsl:template> >+ >+ > <xsl:template name="tag_215"> > <xsl:for-each select="marc:datafield[@tag=215]"> > <span class="results_summary description"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >index 56c9956641..b365fca0e5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >@@ -188,6 +188,12 @@ > > <xsl:if test="(marc:datafield[@tag=214] or marc:datafield[@tag=210])"> > <xsl:choose> >+ <xsl:when test="(marc:datafield[@tag=214]/marc:subfield[@code='r'])"> >+ <xsl:call-template name="tag_214_r" /> >+ </xsl:when> >+ <xsl:when test="(marc:datafield[@tag=214]/marc:subfield[@code='s'])"> >+ <xsl:call-template name="tag_214_s" /> >+ </xsl:when> > <xsl:when test="(marc:datafield[@tag=214] and marc:datafield[@tag=210])"> > <xsl:call-template name="tag_214" /> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >index 448c51b5c6..901347b19a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >@@ -408,6 +408,43 @@ > </span> > </xsl:template> > >+ <xsl:template name="tag_214_s"> >+ <xsl:if test="marc:datafield[@tag=214]/marc:subfield[@code='s']"> >+ <span class="results_summary tag_214_s"> >+ <span class="label">Printing and/or Publishing Information Transcribed as Found in the Colophon: </span> >+ <xsl:for-each select="marc:datafield[@tag=214]"> >+ <xsl:value-of select="marc:subfield[@code='s']"/> >+ <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> >+ </span> >+ </xsl:if> >+ </xsl:template> >+ >+ <xsl:template name="tag_214_r"> >+ <xsl:if test="marc:datafield[@tag=214]/marc:subfield[@code='r']"> >+ <span class="results_summary tag_214_r"> >+ <span class="label">Printing and/or Publishing Information Transcribed as Found in the Main Source of >+Information: </span> >+ <xsl:for-each select="marc:datafield[@tag=214]"> >+ <xsl:value-of select="marc:subfield[@code='r']"/> >+ <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> >+ </span> >+ </xsl:if> >+ </xsl:template> >+ > <xsl:template name="tag_214"> > <xsl:for-each select="marc:datafield[@tag=214]"> > <xsl:sort select="@ind2" data-type="number" /> >-- >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 30430
:
132842
|
132864
|
132872
|
133235
|
134560
|
134652
|
134653
|
134667
|
134668
|
136758
|
136759
|
136760
|
136761
|
136762
|
136763