Bug 3228: Fix for Type: label in XSLT displays.
authorGarry Collum <gcollum@gmail.com>
Sat, 13 Jun 2009 14:51:45 +0000 (10:51 -0400)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 15 Jun 2009 17:43:49 +0000 (12:43 -0500)
Empty nodes must be generated in the XML for MARC21slim2OPACResults - typeOf008 and MARC21slim2OPACResults - materialTypeCode when the fields in the Marc record do not exist.  This patch fixes the "Type: " label.  More testing needs to be done to see if any other labels appear in the Opac if the data is not defined in the MARC record.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl

index 6b79942..2e18e44 100644 (file)
         </div> 
 
 
-        <xsl:if test="$materialTypeCode">
+        <xsl:if test="$materialTypeCode!=''">
         <span class="results_summary"><span class="label">Type: </span>
         <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
         <xsl:value-of select="$materialTypeLabel"/>
index d2edb65..c28ce17 100644 (file)
     </xsl:if>
 
     <span class="results_summary">
-    <xsl:if test="$typeOf008">
+    <xsl:if test="$typeOf008!=''">
         <span class="label">Type: </span>
             <xsl:choose>
                 <xsl:when test="$leader6='a'">