Bug 7845: Multiple 260s don't display properly in search results
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 9 Apr 2012 15:44:38 +0000 (17:44 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 19 Apr 2012 08:51:33 +0000 (10:51 +0200)
Corrects display for multiple 260 fields in intranet and OPAC.
In intranet the order of fields was wrong on the detail page.
In OPAC and intranet punctuation for multiple 260 fields in the
result list was not displaying properly.

Example after correction:
Publisher: Jena : Elsevier, 1907 ; Stuttgart : Franckh, 1907-1992 ; Jena : Urban & Fischer, 1993-2003

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl

index a1dca4f..80dbe03 100644 (file)
                 <xsl:with-param name="label">Publisher: </xsl:with-param>
             </xsl:call-template>
         </xsl:if>
-        
+
         <xsl:if test="marc:datafield[@tag=260]">
         <span class="results_summary publisher"><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>
+                </xsl:if>
+                <xsl:text> </xsl:text>
                 <xsl:if test="marc:subfield[@code='b']">
                 <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
                     <xsl:call-template name="subfieldSelect">
                 <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>
-                    <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+                    <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>
index 87aebec..6bb1c10 100644 (file)
     </xsl:if>
 
     <xsl:if test="marc:datafield[@tag=260]">
-       <span class="results_summary">
-    <span class="label">Publisher: </span>
+        <span class="results_summary publisher"><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">abcg</xsl:with-param>
+                        <xsl:with-param name="codes">a</xsl:with-param>
                     </xsl:call-template>
+                </xsl:if>
+                <xsl:text> </xsl:text>
+                <xsl:if test="marc:subfield[@code='b']">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">b</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:if>
+                <xsl:text> </xsl:text>
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">cg</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+                </xsl:call-template>
+                <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>
+        </span>
     </xsl:if>
 
     <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->
index 189bffe..f507e11 100644 (file)
                 <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:call-template>
                 </xsl:if>
+                <xsl:text> </xsl:text>
                 <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">
                     </xsl:call-template>
                    </xsl:with-param>
                </xsl:call-template>
-                    <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+                    <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>
index d742a29..68a6a1b 100644 (file)
         <xsl:with-param name="label">Publisher: </xsl:with-param>
       </xsl:call-template>
     </xsl:if>
-        
+
     <xsl:if test="marc:datafield[@tag=260]">
-       <span class="results_summary">
-    <span class="label">Publisher: </span> 
+        <span class="results_summary publisher"><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>
+                </xsl:if>
+                <xsl:text> </xsl:text>
+                <xsl:if test="marc:subfield[@code='b']">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">abcg</xsl:with-param>
+                        <xsl:with-param name="codes">b</xsl:with-param>
                     </xsl:call-template>
+                </xsl:if>
+                <xsl:text> </xsl:text>
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">cg</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+                </xsl:call-template>
+                <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>
+        </span>
     </xsl:if>
 
     <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->