Bugzilla – Attachment 32963 Details for
Bug 13164
Incorrect ISSN visualization on the normal view if invalid/cancelled ISSN present
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13164: Incorrect ISSN visualization on the normal view if invalid/cancelled ISSN present
Bug-13164-Incorrect-ISSN-visualization-on-the-norm.patch (text/plain), 10.84 KB, created by
Frédéric Demians
on 2014-10-30 07:48:18 UTC
(
hide
)
Description:
Bug 13164: Incorrect ISSN visualization on the normal view if invalid/cancelled ISSN present
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2014-10-30 07:48:18 UTC
Size:
10.84 KB
patch
obsolete
>From 6f186fc78029bf8823cb24dba395094b1149f078 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 29 Oct 2014 16:24:49 -0300 >Subject: [PATCH] Bug 13164: Incorrect ISSN visualization on the normal view if > invalid/cancelled ISSN present > >Currently, 022$z (and 011$z for UNIMARC) occurences are not shown, but the XSLT >logic used introduces punctuation characters for those $z occurences. > >This patch adds a check for the existence of subfield a, and only loops >on $a subfields. > >To test: >- Create/have a record with 022$z (or 011$z on UNIMARC) but no 022$a (no 011$a on UNIMARC). >- Open the detail page for the record (on both OPAC and staff). >=> FAIL: the ISSN label and ';' and '.' characters incorrectly shown. >- Repeat mixing with 022$a occurences to notice the bug. >- Apply the patch, reload >=> SUCCES: ISSN label shows only on the presence of a $a, and $z are skipped. > no matter how many ISSN fields you add. >- Sign off :-D > >Regards >To+ > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > >Works as described on an UNIMARC DB. Mimics what's done for ISBN field. >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 24 +++++++++++++------ > .../prog/en/xslt/NORMARCslim2intranetDetail.xsl | 24 +++++++++++++------ > .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 27 +++++++++++---------- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 24 +++++++++++++------ > .../bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl | 24 +++++++++++++------ > .../bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl | 28 ++++++++++++---------- > 6 files changed, 98 insertions(+), 53 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index e7bf6d1..6711f9d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -400,13 +400,23 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=022]"> >- <span class="results_summary issn"><span class="label">ISSN: </span> >- <xsl:for-each select="marc:datafield[@tag=022]"> >- <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:for-each> >- </span> >+ <!-- Build ISSN --> >+ <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span class="results_summary issn"><span class="label">ISSN: </span> >+ <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span property="issn"> >+ <xsl:value-of select="."/> >+ <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:for-each> >+ </span> > </xsl:if> > > <xsl:if test="marc:datafield[@tag=013]"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl >index 3271e5b..150a29a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl >@@ -316,13 +316,23 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=022]"> >- <span class="results_summary"><span class="label">ISSN: </span> >- <xsl:for-each select="marc:datafield[@tag=022]"> >- <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:for-each> >- </span> >+ <!-- Build ISSN --> >+ <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span class="results_summary issn"><span class="label">ISSN: </span> >+ <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span property="issn"> >+ <xsl:value-of select="."/> >+ <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:for-each> >+ </span> > </xsl:if> > > <!-- Other Title Statement --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >index 552385e..61d8085 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >@@ -159,19 +159,22 @@ > </li> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=011]"> >+ <!-- Build ISSN --> >+ <xsl:if test="marc:datafield[@tag=011]/marc:subfield[@code='a']"> > <li> >- <strong>ISSN: </strong> >- <xsl:for-each select="marc:datafield[@tag=011]"> >- <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> >+ <strong>ISSN: </strong> >+ <xsl:for-each select="marc:datafield[@tag=011]/marc:subfield[@code='a']"> >+ <span property="issn"> >+ <xsl:value-of select="."/> >+ <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:for-each> > </li> > </xsl:if> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 15960cd..e51c088 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -440,13 +440,23 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=022]"> >- <span class="results_summary issn"><span class="label">ISSN: </span> >- <xsl:for-each select="marc:datafield[@tag=022]"> >- <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:for-each> >- </span> >+ <!-- Build ISSN --> >+ <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span class="results_summary issn"><span class="label">ISSN: </span> >+ <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span property="issn"> >+ <xsl:value-of select="."/> >+ <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:for-each> >+ </span> > </xsl:if> > > <xsl:if test="marc:datafield[@tag=013]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >index 62e004d..7a8e5ce 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >@@ -352,13 +352,23 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=022]"> >- <span class="results_summary"><span class="label">ISSN: </span> >- <xsl:for-each select="marc:datafield[@tag=022]"> >- <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:for-each> >- </span> >+ <!-- Build ISSN --> >+ <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span class="results_summary issn"><span class="label">ISSN: </span> >+ <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']"> >+ <span property="issn"> >+ <xsl:value-of select="."/> >+ <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:for-each> >+ </span> > </xsl:if> > > <!-- Other Title Statement --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >index f7d1984..40eac3a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >@@ -207,19 +207,21 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=011]"> >- <span class="results_summary issn"> >- <span class="label">ISSN: </span> >- <xsl:for-each select="marc:datafield[@tag=011]"> >- <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> >+ <!-- Build ISSN --> >+ <xsl:if test="marc:datafield[@tag=011]/marc:subfield[@code='a']"> >+ <span class="results_summary issn"><span class="label">ISSN: </span> >+ <xsl:for-each select="marc:datafield[@tag=011]/marc:subfield[@code='a']"> >+ <span property="issn"> >+ <xsl:value-of select="."/> >+ <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:for-each> > </span> > </xsl:if> >-- >2.1.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 13164
:
32939
|
32963
|
33083