From 57c6b26df09007539acf63a66f4d727074f4dc23 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 15 Oct 2012 15:39:08 +1300 Subject: [PATCH] Bug 8917 : Link tracking, changes to XSLT Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Jonathan Druart --- C4/XSLT.pm | 3 ++- .../opac-tmpl/prog/en/modules/opac-detail.tt | 9 ++++--- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 15 ++++++++++- .../prog/en/xslt/MARC21slim2OPACResults.xsl | 27 +++++++++++++++++-- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 6600045a34..ffdc3ab975 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -189,7 +189,8 @@ sub XSLTParse4Display { Display856uAsImage OPACDisplay856uAsImage UseControlNumber IntranetBiblioDefaultView BiblioDefaultView singleBranchMode OPACItemLocation - AlternateHoldingsField AlternateHoldingsSeparator / ) + AlternateHoldingsField AlternateHoldingsSeparator + TrackClicks / ) { my $sp = C4::Context->preference( $syspref ); next unless defined($sp); diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 7757c5b004..ac5c0b78b1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -718,13 +718,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( OPACurlOpenInNewWindow ) %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - + [% ELSE %] [% END %] [% ELSE %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - + [% ELSE %] [% END %] @@ -1490,11 +1490,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( itemdata_enumchron ) %][% ITEM_RESULT.enumchron %][% END %] [% IF ( itemdata_uri ) %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - Link to resource + Link to resource [% ELSE %] [% ITEM_RESULT.uri %] [% END %] - [% END %] + + [% END %] [% IF ( itemdata_uri ) %][% ITEM_RESULT.uri %][% END %] [% IF ( itemdata_copynumber ) %][% ITEM_RESULT.copynumber %][% END %] [% INCLUDE 'item-status.inc' item = ITEM_RESULT %] diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 31cbb362ce..5130e8b11d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -26,6 +26,8 @@ + + { @@ -550,7 +552,18 @@ Online resources: - + + + + /cgi-bin/koha/tracklinks.pl?uri=;biblionumber= + + + /cgi-bin/koha/tracklinks.pl?uri=;biblionumber= + + + + + _blank diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl index cfcc2dd773..4335e504dc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl @@ -29,6 +29,7 @@ + @@ -950,7 +951,18 @@ - + + + + /cgi-bin/koha/tracklinks.pl?uri=;biblionumber= + + + /cgi-bin/koha/tracklinks.pl?uri=;biblionumber= + + + + + 100 @@ -974,7 +986,18 @@ - + + + + /cgi-bin/koha/tracklinks.pl?uri=;biblionumber= + + + /cgi-bin/koha/tracklinks.pl?uri=;biblionumber= + + + + + 100 -- 2.39.5