Bugzilla – Attachment 102120 Details for
Bug 17938
XSLT: Label of 583 is repeated for multiple tags and private notes don't display in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields
Bug-17938-Fix-display-of-label-for-repeated-MARC-5.patch (text/plain), 5.80 KB, created by
Jonathan Druart
on 2020-03-31 10:50:15 UTC
(
hide
)
Description:
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-31 10:50:15 UTC
Size:
5.80 KB
patch
obsolete
>From 0ba3a0cccabcb1eabf750500926a3020ccc60e48 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 26 Mar 2020 22:30:52 +0000 >Subject: [PATCH] Bug 17938: Fix display of label for repeated MARC 583 - > Action note fields > >When there are mulitple 583 on a record, the label "Action note" will be >repeated for each. This fixes it, so that the label only appears once and >multiple fields are separated by | following the existing pattern. > >Also makes sure there is a space between $z and other subfields. > >Note: >Ind. 1 = private - These won't display in the OPAC >Ind. 1 = 0 or empty - These will display in the OPAC >Staff will display all 583 independent from indicator. > >To test: >- Add one or more records with none, one and muliple 583, at least one including $z > For examples see: > http://www.loc.gov/marc/bibliographic/bd583.html >- Verify display problems >- Apply patch >- Verify display is improved - one label and $z is followed by a space > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 37 +++++++++---------- > .../en/xslt/MARC21slim2OPACDetail.xsl | 29 +++++++-------- > 2 files changed, 32 insertions(+), 34 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index d44322d6ff..6691eaae14 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1010,25 +1010,24 @@ > </xsl:if> > > <!-- 583 --> >- <xsl:if test="marc:datafield[@tag=583]"> >- <xsl:for-each select="marc:datafield[@tag=583]"> >- <xsl:if test="@ind1=1 or @ind1=' '"> >- <span class="results_summary actionnote"> >- <span class="label">Action note: </span> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code='z']"> >- <xsl:value-of select="marc:subfield[@code='z']"/> >- </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> >- </span> >- </xsl:if> >- </xsl:for-each> >- </xsl:if> >+ <xsl:if test="marc:datafield[@tag=583]"> >+ <span class="results_summary actionnote"> >+ <span class="label">Action note: </span> >+ <xsl:for-each select="marc:datafield[@tag=583]"> >+ <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> > > <!-- 508 --> > <xsl:if test="marc:datafield[@tag=508]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 0ade99700c..ca5ee81dd7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1082,24 +1082,23 @@ > </xsl:if> > > <!-- 583 --> >- <xsl:if test="marc:datafield[@tag=583]"> >- <xsl:for-each select="marc:datafield[@tag=583]"> >- <xsl:if test="@ind1=1 or @ind1=' '"> >+ <xsl:if test="marc:datafield[@tag=583 and not(@ind1=0)]"> > <span class="results_summary actionnote"> > <span class="label">Action note: </span> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code='z']"> >- <xsl:value-of select="marc:subfield[@code='z']"/> >- </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:for-each select="marc:datafield[@tag=583 and not(@ind1=0)]"> >+ <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:for-each> > </xsl:if> > > <!-- 508 --> >-- >2.20.1
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 17938
:
59204
|
102025
|
102053
| 102120