[Koha-patches] [PATCH 2/2] [SIGNED-OFF] Bug 5919: Display MARC21 fields 583, 586, 530

Nicole C. Engard nengard at bywatersolutions.com
Tue Mar 22 22:32:50 CET 2011


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

This patch adds the MARC21 fields 583 (Action note), 586 (Awards note), and
530 (Additional physical form available note) to the OPAC details display in the
XSLT-controlled portion of the page. In order to allow libraries to hide these
notes if they do not want them added, the notes have been given CSS classes.

Depends on patch for Bug 3098.

Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
 .../prog/en/xslt/MARC21slim2OPACDetail.xsl         |   51 ++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
index 37c5501..dbd9306 100755
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
@@ -534,6 +534,25 @@
         </span>
         </xsl:if>
 
+        <!-- 530 -->
+        <xsl:if test="marc:datafield[@tag=530]">
+        <xsl:for-each select="marc:datafield[@tag=530]">
+        <span class="results_summary additionalforms">
+            <xsl:call-template name="subfieldSelect">
+                <xsl:with-param name="codes">abcd</xsl:with-param>
+            </xsl:call-template>
+            <xsl:for-each select="marc:subfield[@code='u']">
+                <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
+                <xsl:if test="$OPACURLOpenInNewWindow='1'">
+                    <xsl:attribute name="target">_blank</xsl:attribute>
+                </xsl:if>
+                <xsl:value-of select="text()"/>
+                </a>
+            </xsl:for-each>
+        </span>
+        </xsl:for-each>
+        </xsl:if>
+
         <!-- 505 -->
         <xsl:if test="marc:datafield[@tag=505]">
         <xsl:for-each select="marc:datafield[@tag=505]">
@@ -565,6 +584,38 @@
         </xsl:for-each>
         </xsl:if>
 
+        <!-- 583 -->
+        <xsl:if test="marc:datafield[@tag=583]">
+        <xsl:for-each select="marc:datafield[@tag=583]">
+            <xsl:if test="@ind1=1 or @ind1=' '">
+            <span class="results_summary actionnote">
+                <xsl:choose>
+                <xsl:when test="marc:subfield[@code='z']">
+                    <xsl:value-of select="marc:subfield[@code='z']"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:otherwise>
+                </xsl:choose>
+            </span>
+            </xsl:if>
+        </xsl:for-each>
+        </xsl:if>
+
+        <!-- 586 -->
+        <xsl:if test="marc:datafield[@tag=586]">
+        <xsl:for-each select="marc:datafield[@tag=586]">
+            <span class="results_summary awardsnote">
+                <xsl:if test="@ind1=' '">
+                <span class="label">Awards: </span>
+                </xsl:if>
+                <xsl:value-of select="marc:subfield[@code='a']"/>
+            </span>
+        </xsl:for-each>
+        </xsl:if>
+
         <!-- 773 -->
         <xsl:if test="marc:datafield[@tag=773]">
         <xsl:for-each select="marc:datafield[@tag=773]">
-- 
1.7.2.3



More information about the Koha-patches mailing list