From 8fa0082188f26ced2f0cc72a1501800cfb60aacb Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 15 Oct 2012 11:55:51 +1300 Subject: [PATCH] Bug 8917 : Adding link tracking to the opac detail page, without xslt Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Jonathan Druart --- .../opac-tmpl/prog/en/modules/opac-detail.tt | 21 ++++++++++++++++++- opac/opac-detail.pl | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) 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 cd58cb5738..7757c5b004 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -716,7 +716,19 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% END %] - [% IF ( OPACURLOpenInNewWindow ) %][% ELSE %][% END %] + [% IF ( OPACurlOpenInNewWindow ) %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + + [% ELSE %] + + [% END %] + [% END %] [% MARCurl.linktext %] [% IF ( MARCurl.notes ) %]
    [% FOREACH note IN MARCurl.notes %]
  • [% note.note %]
  • [% END %]
[% END %] @@ -1476,6 +1488,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( itemdata_ccode ) %][% ITEM_RESULT.ccode %][% END %] [% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (Browse shelf)[% END %][% END %] [% IF ( itemdata_enumchron ) %][% ITEM_RESULT.enumchron %][% END %] + [% IF ( itemdata_uri ) %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + Link to resource + [% ELSE %] + [% ITEM_RESULT.uri %] + [% 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/opac/opac-detail.pl b/opac/opac-detail.pl index bb9cbd5d7b..5b2da845d5 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -1006,5 +1006,6 @@ $template->{VARS}->{OPACPopupAuthorsSearch} = C4::Context->preference('OPACPopup if (C4::Context->preference('OpacHighlightedWords')) { $template->{VARS}->{query_desc} = $query->param('query_desc'); } +$template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks'); output_html_with_http_headers $query, $cookie, $template->output; -- 2.39.5