+<!-- Links found in 856$u. This is copied verbatim from MARC21 detail view and should be identical to code in NORMARC detail view (except for $Show856uAsImage='Results'). -->
+ <xsl:if test="marc:datafield[@tag=856]">
+ <span class="results_summary online_resources"><span class="label">Online resources: </span>
+ <xsl:for-each select="marc:datafield[@tag=856]">
+ <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
+ <a property="url">
+ <xsl:choose>
+ <xsl:when test="$OPACTrackClicks='track'">
+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$OPACTrackClicks='anonymous'">
+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&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:otherwise>
+ </xsl:choose>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
+ <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$URLLinkText!=''">
+ <xsl:value-of select="$URLLinkText"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Click here to access online</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:choose>
+ <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
+ <xsl:otherwise> | </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+<!-- End of links found in 856$u -->
+