Bug 17853: Don't remove () from 780 link text
authorGrace McKenzie <grace.mcky@gmail.com>
Wed, 18 Jan 2017 22:55:48 +0000 (22:55 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 11 May 2020 09:02:18 +0000 (10:02 +0100)
To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>

Bug 17853: Don't remove () from 785 link text and restore link value of 780

The only thing we change for 780 and 785 is, that if the display
text contains (), they are no longer removed.

To test:
- Catalogue a record with 785$a some text (including) parenthesis
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

index cd3a060..31c094d 100644 (file)
             <xsl:choose>
                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
                     <a><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:value-of select="translate($f780, '()', '')"/>
+                        <xsl:value-of select="$f780"/>
                     </a>
                 </xsl:when>
                 <xsl:otherwise>
                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
-                        <xsl:value-of select="translate($f780, '()', '')"/>
+                        <xsl:value-of select="$f780"/>
                     </a>
                 </xsl:otherwise>
             </xsl:choose>
             <xsl:choose>
                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
                     <a><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:value-of select="translate($f785, '()', '')"/>
+                        <xsl:value-of select="$f785"/>
                     </a>
                 </xsl:when>
                 <xsl:otherwise>
                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
-                        <xsl:value-of select="translate($f785, '()', '')"/>
+                        <xsl:value-of select="$f785"/>
                     </a>
                 </xsl:otherwise>
             </xsl:choose>
index 21709f3..656c56b 100644 (file)
             <xsl:choose>
                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
                     <a><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:value-of select="translate($f780, '()', '')"/>
+                        <xsl:value-of select="$f780"/>
                     </a>
                 </xsl:when>
                 <xsl:otherwise>
                     <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
-                        <xsl:value-of select="translate($f780, '()', '')"/>
+                        <xsl:value-of select="$f780"/>
                     </a>
                 </xsl:otherwise>
             </xsl:choose>
             <xsl:choose>
                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
                     <a><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:value-of select="translate($f785, '()', '')"/>
+                        <xsl:value-of select="$f785"/>
                     </a>
                 </xsl:when>
                 <xsl:otherwise>
                     <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
-                        <xsl:value-of select="translate($f785, '()', '')"/>
+                        <xsl:value-of select="$f785"/>
                     </a>
                 </xsl:otherwise>
             </xsl:choose>