Bug 4300: Fix display of textual holdings (866)
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 16 Jan 2012 22:05:42 +0000 (23:05 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 17 Jan 2012 16:41:53 +0000 (17:41 +0100)
Fixed problems:
- only $z, but not $a was shown
- only first $z for each 866 field was shown
- each 866 field produced a ; even if no $z was present

After patch was applied:
- OPAC displays 866 $a and $z, separating each field with ;
- Staff displays 866 $a, $x and $z, separating each field with ;

Example(s) for testing:
866 $a1-86 (1941-1987)$xbound in 2 v. per year$zSome issues missing
866 $a1-86 (1941-1987)
866 $a--86 (1941-1897)$xinternal note
866 $zfirst note,$zsecond note

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

index 9e16667..cb5b395 100644 (file)
         </xsl:for-each>
         </xsl:if>
 
+        <!-- 866 textual holdings -->
+        <xsl:if test="marc:datafield[@tag=866]">
+            <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
+                <xsl:for-each select="marc:datafield[@tag=866]">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">axz</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>
+        </xsl:if>
+
         <!--  775 Other Edition  -->
         <xsl:if test="marc:datafield[@tag=775]">
         <span class="results_summary other_editions"><span class="label">Other Editions: </span>
index 43e2658..f6d3efd 100755 (executable)
         </span>
         </xsl:for-each>
 
-       <!-- 866 holdings public note -->
+        <!-- 866 textual holdings -->
         <xsl:if test="marc:datafield[@tag=866]">
-        <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
-        <xsl:for-each select="marc:datafield[@tag=866]">
-                <xsl:value-of select="marc:subfield[@code='z']"/>
-                <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 class="results_summary holdings_note"><span class="label">Holdings Note: </span>
+                <xsl:for-each select="marc:datafield[@tag=866]">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">az</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>
         </xsl:if>
 
         <!--  775 Other Edition  -->