Bug 12901: (consistency followup) add buildBiblioDefaultViewURL to MARC21 XSLT

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

http://bugs.koha-community.org/show_bug.cgi?id=9828

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2014-09-15 10:44:16 -03:00
parent 53a6369ba3
commit eedc8e3543
2 changed files with 31 additions and 16 deletions

View File

@ -403,22 +403,16 @@
</xsl:call-template>
</xsl:if>
<a><xsl:attribute name="href">
<xsl:choose>
<xsl:when test="$BiblioDefaultView='normal'">
/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
</xsl:when>
<xsl:when test="$BiblioDefaultView='isbd'">
/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
</xsl:when>
<xsl:when test="$BiblioDefaultView='marc'">
/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
</xsl:when>
<xsl:otherwise>
/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute><xsl:attribute name="class">title</xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:call-template name="buildBiblioDefaultViewURL">
<xsl:with-param name="BiblioDefaultView">
<xsl:value-of select="$BiblioDefaultView"/>
</xsl:with-param>
</xsl:call-template>
<xsl:value-of select="$biblionumber"/>
</xsl:attribute>
<xsl:attribute name="class">title</xsl:attribute>
<xsl:if test="marc:datafield[@tag=245]">
<xsl:for-each select="marc:datafield[@tag=245]">

View File

@ -72,6 +72,27 @@
</xsl:if>
</xsl:template>
<xsl:template name="buildBiblioDefaultViewURL">
<xsl:param name="BiblioDefaultView"/>
<xsl:choose>
<xsl:when test="$BiblioDefaultView='normal'">
<xsl:text>/cgi-bin/koha/catalogue/detail.pl?biblionumber=</xsl:text>
</xsl:when>
<xsl:when test="$BiblioDefaultView='isbd'">
<xsl:text>/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=</xsl:text>
</xsl:when>
<xsl:when test="$BiblioDefaultView='labeled_marc'">
<xsl:text>/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=</xsl:text>
</xsl:when>
<xsl:when test="$BiblioDefaultView='marc'">
<xsl:text>/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>/cgi-bin/koha/catalogue/detail.pl?biblionumber=</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="chopPunctuation">
<xsl:param name="chopString"/>
<xsl:variable name="length" select="string-length($chopString)"/>