[Koha-patches] [PATCH] Bug 6153: Display imprint subfields in order

Ian Walls ian.walls at bywatersolutions.com
Sun Apr 10 23:32:26 CEST 2011


From: Jared Camins-Esakov <jcamins at bywatersolutions.com>

Prior to this patch, the imprint (field 260) was displayed out-of-order on the
MARC21 XSLT record detail page. For example, the following data:
=260  \\$aNew York :$bHarper,$c2003$g(2005 printing)
Displayed as:
Harper, New York : 2003 (2005 printing)
Instead of:
New York : Harper, 2003 (2005 printing)

Even more problematically, the following data:
=260  \\$a[S.l. :$bs.n.],$c1860.
Displayed as:
s.n.], [S.l. : 1860
Instead of:
[S.l. : s.n.], 1860.

This patch changes the MARC21 OPAC Details display to display the imprint
subfields in the proper order (as the Results display already does).

Signed-off-by: Ian Walls <ian.walls at bywatersolutions.com>
---
 .../prog/en/xslt/MARC21slim2OPACDetail.xsl         |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
 mode change 100644 => 100755 koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
old mode 100644
new mode 100755
index 8277872..fd2baa5
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
@@ -343,6 +343,11 @@
         <xsl:if test="marc:datafield[@tag=260]">
         <span class="results_summary"><span class="label">Publisher: </span>
             <xsl:for-each select="marc:datafield[@tag=260]">
+                <xsl:if test="marc:subfield[@code='a']">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">a</xsl:with-param>
+                    </xsl:call-template>&nbsp;
+                </xsl:if>
                 <xsl:if test="marc:subfield[@code='b']">
                 <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
                     <xsl:call-template name="subfieldSelect">
@@ -354,7 +359,7 @@
                 <xsl:call-template name="chopPunctuation">
                   <xsl:with-param name="chopString">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">acg</xsl:with-param>
+                        <xsl:with-param name="codes">cg</xsl:with-param>
                     </xsl:call-template>
                    </xsl:with-param>
                </xsl:call-template>
-- 
1.5.6.5



More information about the Koha-patches mailing list