[Koha-patches] [PATCH] Bug 3228: Fix for Type: label in XSLT displays.
Garry Collum
gcollum at gmail.com
Sat Jun 13 16:51:45 CEST 2009
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.
---
.../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 +-
.../prog/en/xslt/MARC21slim2OPACResults.xsl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
index 6b79942..2e18e44 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
@@ -132,7 +132,7 @@
</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"/>
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
index d2edb65..c28ce17 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
@@ -461,7 +461,7 @@
</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'">
--
1.5.6.5
More information about the Koha-patches
mailing list