Bugzilla – Attachment 75847 Details for
Bug 20339
Unify MARC21 ISBN/ISSN handling in XSLT in the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20339: Unify MARC21 ISBN/ISSN handling in XSL
Bug-20339-Unify-MARC21-ISBNISSN-handling-in-XSL.patch (text/plain), 6.62 KB, created by
Martin Renvoize (ashimema)
on 2018-06-06 12:02:17 UTC
(
hide
)
Description:
Bug 20339: Unify MARC21 ISBN/ISSN handling in XSL
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-06-06 12:02:17 UTC
Size:
6.62 KB
patch
obsolete
>From 1cb491748c48c9d7311ac0ec0ed49b59b9a10594 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Tue, 6 Mar 2018 11:59:28 +0200 >Subject: [PATCH] Bug 20339: Unify MARC21 ISBN/ISSN handling in XSL > >The code to show the ISBN and ISSN is repeated between the search results >and the detail view. Create a function to show the ISBN/ISSN, and call >that instead. > >Test plan: >1) Apply patch >2) Search for any records, check that the ISBN and ISSN are shown > correctly >3) Go to biblio detail pages, check that the ISBN and ISSN are shown > correctly > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> > >Signed-off-by: claude <claude.brayer@cea.fr> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 38 +------------------- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 19 +--------- > .../intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 40 ++++++++++++++++++++++ > 3 files changed, 42 insertions(+), 55 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index cf39ec4bf0..885a8dc48c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -448,43 +448,7 @@ > </xsl:if> > > >- <!-- Build ISBN --> >- <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]/marc:subfield[@code='a']"> >- <span property="isbn"> >- <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> >- >- <!-- 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:call-template name="showISBNISSN"/> > > <xsl:if test="marc:datafield[@tag=013]"> > <span class="results_summary patent_info"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 3e508c048c..4edc2f2d2c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -895,24 +895,7 @@ > </span> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=020]"> >- <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:for-each> >- </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> >- </xsl:if> >+ <xsl:call-template name="showISBNISSN"/> > > <xsl:if test="marc:datafield[@tag=250]"> > <span class="results_summary edition"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 192107b280..a3db596e87 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -298,6 +298,46 @@ > </span> > </xsl:template> > >+ <xsl:template name="showISBNISSN"> >+ <xsl:call-template name="showSingleSubfield"> >+ <xsl:with-param name="tag">020</xsl:with-param> >+ <xsl:with-param name="code">a</xsl:with-param> >+ <xsl:with-param name="class">isbn</xsl:with-param> >+ <xsl:with-param name="label">ISBN: </xsl:with-param> >+ </xsl:call-template> >+ <xsl:call-template name="showSingleSubfield"> >+ <xsl:with-param name="tag">022</xsl:with-param> >+ <xsl:with-param name="code">a</xsl:with-param> >+ <xsl:with-param name="class">issn</xsl:with-param> >+ <xsl:with-param name="label">ISSN: </xsl:with-param> >+ </xsl:call-template> >+ </xsl:template> >+ >+ <xsl:template name="showSingleSubfield"> >+ <xsl:param name="tag"/> >+ <xsl:param name="code"/> >+ <xsl:param name="class"/> >+ <xsl:param name="label"/> >+ <xsl:if test="marc:datafield[@tag=$tag]/marc:subfield[@code=$code]"> >+ <span><xsl:attribute name="class"><xsl:value-of select="concat('results_summary ', $class)"/></xsl:attribute> >+ <span class="label"><xsl:value-of select="$label"/></span> >+ <xsl:for-each select="marc:datafield[@tag=$tag]/marc:subfield[@code=$code]"> >+ <span><xsl:attribute name="property"><xsl:value-of select="$class"/></xsl:attribute> >+ <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:template> >+ > </xsl:stylesheet> > > <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp. >-- >2.14.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 20339
:
72467
|
72683
| 75847