Bugzilla – Attachment 31167 Details for
Bug 12829
Incorrect ISBN visualization on the normal view if invalid/cancelled ISBN present
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12829: (MARC21) properly skip 020z when rendering ISBN for normal record display
Bug-12829-MARC21-properly-skip-020z-when-rendering.patch (text/plain), 4.16 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-08-26 21:50:04 UTC
(
hide
)
Description:
Bug 12829: (MARC21) properly skip 020z when rendering ISBN for normal record display
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-08-26 21:50:04 UTC
Size:
4.16 KB
patch
obsolete
>From 3d484e516f5f1e0ea3530aab7d82a9b163c335a1 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Tue, 26 Aug 2014 18:09:42 -0300 >Subject: [PATCH] Bug 12829: (MARC21) properly skip 020z when rendering ISBN > for normal record display > >Currently, 020$z oocurences are not shown, but the XSLT logic used is >introducing punctuation characters for those $z occurences. > >This patch adds a check for the existence of subfield a, and skips otherwise. > >To test: >- Create/have a record with 020$z (one or more) but no 020$a. >- Open the detail page for the record (on both OPAC and staff). >=> FAIL: the ISBN label and ';' and '.' characters incorrectly shown. >- Repeat mixing with 020$a occurences to notice the bug. >- Apply the patch, reload >=> SUCCES: ISBN label shows only on the presence of a 020$a, and 020$z are skipped. >- Sign off :-D > >Regards >To+ >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 16 +++++++++++----- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 18 +++++++++++------- > 2 files changed, 22 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 003f528..daab51b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -378,15 +378,21 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=020]"> >+ <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']"> > <span class="results_summary isbn"><span class="label">ISBN: </span> > <xsl:for-each select="marc:datafield[@tag=020]"> >- <xsl:variable name="isbn" select="marc:subfield[@code='a']"/> >- <xsl:value-of select="marc:subfield[@code='a']"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:if test="marc:subfield[@code='a']"> >+ <span property="isbn"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ <xsl:choose> >+ <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </xsl:if> > </xsl:for-each> > </span> >- </xsl:if> >+ </xsl:if> > > <xsl:if test="marc:datafield[@tag=022]"> > <span class="results_summary issn"><span class="label">ISSN: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 6e22599..c4532ea 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -415,17 +415,21 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=020]"> >+ <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']"> > <span class="results_summary isbn"><span class="label">ISBN: </span> > <xsl:for-each select="marc:datafield[@tag=020]"> >- <span property="isbn"> >- <xsl:variable name="isbn" select="marc:subfield[@code='a']"/> >- <xsl:value-of select="marc:subfield[@code='a']"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >- </span> >+ <xsl:if test="marc:subfield[@code='a']"> >+ <span property="isbn"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ <xsl:choose> >+ <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </xsl:if> > </xsl:for-each> > </span> >- </xsl:if> >+ </xsl:if> > > <xsl:if test="marc:datafield[@tag=022]"> > <span class="results_summary issn"><span class="label">ISSN: </span> >-- >1.9.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 12829
:
31165
|
31166
|
31167
|
31168
|
31182
|
32936
|
32938
|
33273
|
33274