[Koha-patches] [PATCH] Bug 5175: Publisher link breaks display, if no publisher exists
Katrin Fischer
Katrin.Fischer.83 at web.de
Sat Nov 20 14:00:01 CET 2010
If there is no publisher the empty publisher link will break the record display
in staff and intranet.
This patch adds a check for existence of subfield b.
---
.../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 ++
.../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
index 075472e..a49e04d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
@@ -222,11 +222,13 @@
<xsl:if test="marc:datafield[@tag=260]">
<span class="results_summary"><span class="label">Publisher: </span>
<xsl:for-each select="marc:datafield[@tag=260]">
+ <xsl:if test="marc:subfield[@code='b']">
<a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</a>
+ </xsl:if>
<xsl:text> </xsl:text>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
index e76b8df..8334a02 100755
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
@@ -243,11 +243,13 @@
<xsl:if test="marc:datafield[@tag=260]">
<span class="results_summary"><span class="label">Publisher: </span>
<xsl:for-each select="marc:datafield[@tag=260]">
+ <xsl:if test="marc:subfield[@code='b']">
<a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</a>
+ </xsl:if>
<xsl:text> </xsl:text>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
--
1.7.1
More information about the Koha-patches
mailing list