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>
(cherry picked from commit 9a58871503)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75da739b1b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Nazlı Çetin 2018-11-27 15:24:38 +00:00 committed by Lucas Gass
parent b678c88064
commit e5d232239d
2 changed files with 32 additions and 2 deletions

View File

@ -945,7 +945,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

@ -1080,7 +1080,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>