Bug 21887: (For OPAC) 856 link problem in XSLT result lists and detail page

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Nazlı Çetin 2018-11-27 15:24:38 +00:00 committed by Martin Renvoize
parent 4903cee9e9
commit 9a58871503
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 32 additions and 2 deletions

View File

@ -957,7 +957,22 @@
<xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&amp;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
<xsl:choose>
<xsl:when test="@ind1=7">
<xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
</xsl:when>
<xsl:when test="@ind1=1">
<xsl:text>ftp://</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>http://</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:value-of select="marc:subfield[@code='u']"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$OPACURLOpenInNewWindow='1'">

View File

@ -1129,7 +1129,22 @@
<xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&amp;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
<xsl:choose>
<xsl:when test="@ind1=7">
<xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
</xsl:when>
<xsl:when test="@ind1=1">
<xsl:text>ftp://</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>http://</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:value-of select="marc:subfield[@code='u']"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>