From 1d4aa41faa601696e37d7334cf9511f541bc26dc Mon Sep 17 00:00:00 2001 From: Jonathan Druart <jonathan.druart@biblibre.com> Date: Wed, 23 Apr 2014 13:34:45 +0200 Subject: [PATCH] Bug 8992: XSLT changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch add the same behavior as previous patches for the xslt view. Signed-off-by: valérie bertrand <valerie.bertrand@univ-lyon3.fr> --- C4/XSLT.pm | 2 +- .../bootstrap/en/xslt/UNIMARCslimUtils.xsl | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 1d09010..2269d79 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -206,7 +206,7 @@ sub XSLTParse4Display { UseControlNumber IntranetBiblioDefaultView BiblioDefaultView singleBranchMode OPACItemLocation DisplayIconsXSLT AlternateHoldingsField AlternateHoldingsSeparator - TrackClicks / ) + TrackClicks IdRef / ) { my $sp = C4::Context->preference( $syspref ); next unless defined($sp); diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl index fc4faa1..b4d307d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl @@ -316,6 +316,7 @@ <xsl:param name="tag" /> <xsl:param name="label" /> <xsl:param name="spanclass" /> + <xsl:variable name="IdRef" select="marc:sysprefs/marc:syspref[@name='IdRef']"/> <xsl:if test="marc:datafield[@tag=$tag]"> <span class="results_summary author {$spanclass}"> <span class="label"> @@ -354,6 +355,20 @@ </xsl:if> </xsl:for-each> </a> + <xsl:if test="$IdRef"> + <xsl:if test="marc:subfield[@code=3]"> + <xsl:text> </xsl:text> + <a> + <xsl:attribute name="href"> + <xsl:text>/cgi-bin/koha/opac-idref.pl?unimarc3=</xsl:text> + <xsl:value-of select="marc:subfield[@code=3]"/> + </xsl:attribute> + <xsl:attribute name="title">IdRef</xsl:attribute> + <xsl:attribute name="rel">gb_page_center[600,500]</xsl:attribute> + <xsl:text>Idref</xsl:text> + </a> + </xsl:if> + </xsl:if> <xsl:if test="not(position() = last())"> <span style="padding: 3px;"> <xsl:text>;</xsl:text> -- 1.7.2.5