Bugzilla – Attachment 31168 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: (NORMARC) properly skip 020z when rendering ISBN for normal record display
Bug-12829-NORMARC-properly-skip-020z-when-renderin.patch (text/plain), 4.45 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-08-26 21:51:42 UTC
(
hide
)
Description:
Bug 12829: (NORMARC) properly skip 020z when rendering ISBN for normal record display
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-08-26 21:51:42 UTC
Size:
4.45 KB
patch
obsolete
>From 4e8b80d2450b4045785c7fd80ddd0e9a4b89e776 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Tue, 26 Aug 2014 18:45:46 -0300 >Subject: [PATCH] Bug 12829: (NORMARC) 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/NORMARCslim2intranetDetail.xsl | 18 ++++++++++++------ > .../bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl | 18 ++++++++++++------ > 2 files changed, 24 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl >index 3271e5b..316b76d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl >@@ -306,15 +306,21 @@ > > <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr> > >- <xsl:if test="marc:datafield[@tag=020]"> >- <span class="results_summary"><span class="label">ISBN: </span> >+ <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"><span class="label">ISSN: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >index e9fd625..258cb1b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >@@ -326,15 +326,21 @@ > > <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr> > >- <xsl:if test="marc:datafield[@tag=020]"> >- <span class="results_summary"><span class="label">ISBN: </span> >+ <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"><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