Bug 8144 - 775 tag in the MARC record causes display issue
authorPaul Poulain <paul.poulain@biblibre.com>
Mon, 28 May 2012 15:36:32 +0000 (17:36 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 28 May 2012 15:36:32 +0000 (17:36 +0200)
Fixing XSL template in the OPAC and staff client following
recommendations by Jared.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Fixes the markup and correctly displays 775 notes.

koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

index 80dbe03..c7fb89c 100644 (file)
         <xsl:if test="marc:datafield[@tag=775]">
         <span class="results_summary other_editions"><span class="label">Other Editions: </span>
         <xsl:for-each select="marc:datafield[@tag=775]">
+            <xsl:variable name="f775">
+                <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
+                <xsl:with-param name="codes">a_t</xsl:with-param>
+                </xsl:call-template></xsl:with-param></xsl:call-template>
+            </xsl:variable>
             <xsl:if test="marc:subfield[@code='i']">
                 <xsl:call-template name="subfieldSelect">
                     <xsl:with-param name="codes">i</xsl:with-param>
                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
             </xsl:when>
             <xsl:otherwise>
-                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
+                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
             </xsl:otherwise>
             </xsl:choose>
             <xsl:call-template name="subfieldSelect">
-                <xsl:with-param name="codes">t</xsl:with-param>
+                <xsl:with-param name="codes">a_t</xsl:with-param>
             </xsl:call-template>
             </a>
             <xsl:choose>
index f507e11..b6db8b4 100644 (file)
         <xsl:if test="marc:datafield[@tag=775]">
         <span class="results_summary other_editions"><span class="label">Other Editions: </span>
         <xsl:for-each select="marc:datafield[@tag=775]">
+            <xsl:variable name="f775">
+                <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
+                <xsl:with-param name="codes">a_t</xsl:with-param>
+                </xsl:call-template></xsl:with-param></xsl:call-template>
+            </xsl:variable>
             <xsl:if test="marc:subfield[@code='i']">
                 <xsl:call-template name="subfieldSelect">
                     <xsl:with-param name="codes">i</xsl:with-param>
                 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
             </xsl:when>
             <xsl:otherwise>
-                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
+                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
             </xsl:otherwise>
             </xsl:choose>
             <xsl:call-template name="subfieldSelect">
-                <xsl:with-param name="codes">t</xsl:with-param>
+                <xsl:with-param name="codes">a_t</xsl:with-param>
             </xsl:call-template>
             </a>
             <xsl:choose>