Improve detail page MARC21 XSL file for 505 and 520 tags
authorFrédéric Demians <f.demians@tamil.fr>
Sun, 8 Nov 2009 09:28:59 +0000 (10:28 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 30 Apr 2010 03:36:24 +0000 (23:36 -0400)
Some tags weren't displayed propertly:

505  If there is no indicator 1, content label is not displayed and
     then repeated 505 tags are also incorrecly displayed. This patch
     add a default label.
502  Wasn't displayed at all. Added in this patch.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

index 4a4d2c2..5b0c085 100644 (file)
         <xsl:for-each select="marc:datafield[@tag=505]">
         <span class="results_summary"><span class="label">
         <xsl:choose>
-        <xsl:when test="@ind1=0">
-            Contents:
-        </xsl:when>
         <xsl:when test="@ind1=1">
             Incomplete contents:
         </xsl:when>
         <xsl:when test="@ind1=1">
             Partial contents:
         </xsl:when>
+        <xsl:otherwise>
+            Contents:
+        </xsl:otherwise>
         </xsl:choose>  
         </span>
         <xsl:choose>
         </xsl:for-each>
         </xsl:if>
 
+        <xsl:for-each select="marc:datafield[@tag=520]">
+        <span class="results_summary"><span class="label">
+        <xsl:choose>
+          <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
+          <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
+          <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
+          <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
+          <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
+          <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
+        </xsl:choose>
+        </span>
+        <xsl:call-template name="subfieldSelect">
+          <xsl:with-param name="codes">abcu</xsl:with-param>
+        </xsl:call-template>
+        </span>
+        </xsl:for-each>
+
         <!-- 780 -->
         <xsl:if test="marc:datafield[@tag=780]">
         <xsl:for-each select="marc:datafield[@tag=780]">