Bugzilla – Attachment 72683 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.53 KB, created by
Biblibre Sandboxes
on 2018-03-12 13:22:32 UTC
(
hide
)
Description:
Bug 20339: Unify MARC21 ISBN/ISSN handling in XSL
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2018-03-12 13:22:32 UTC
Size:
6.53 KB
patch
obsolete
>From 21dc370d9f57c6e7c7c8a5f8c03212d4eecf2ea8 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> >--- > .../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 b699341..f4e2b04 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -447,43 +447,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 0e8ebd6..d6c9a952c 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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 192107b..a3db596 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.7.4
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