[Koha-patches] [PATCH] Bug 4300: Fix display of textual holdings (866)

Katrin Fischer Katrin.Fischer.83 at web.de
Mon Jan 16 23:12:32 CET 2012


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
---
 .../prog/en/xslt/MARC21slim2intranetDetail.xsl     |   12 ++++++++++++
 .../prog/en/xslt/MARC21slim2OPACDetail.xsl         |   16 +++++++++-------
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
index 9e16667..abc0975 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
@@ -588,6 +588,18 @@
         </xsl:if>
         </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]">
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
index 43e2658..f6d3efd 100755
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
@@ -717,14 +717,16 @@
         </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  -->
-- 
1.7.5.4



More information about the Koha-patches mailing list