From 05638842ae35c2c2de92f40ad1f506fb67467a27 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 21 Jul 2015 13:09:39 +1000 Subject: [PATCH] Bug 14575 - OPACURLOpenInNewWindow should apply to item-level urls too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch applies the OPACURLOpenInNewWindow system preference to item-level urls (in addition to the pre-existing bib-level url handling). _TEST PLAN_ Before applying: 1) Set OPACURLOpenInNewWindow to "don't" and click on an item-level url 2) Note that the current tab changes to that url 3) Set OPACURLOpenInNewWindow to "do" and click on an item-level url 4) Note that the current tab changes to that url Apply the patch. After applying: 5) Click on an item-level url 6) Note that the url opens in a new tab (as OPACURLOpenInNewWindow should be set to "do") 7) Set OPACURLOpenInNewWindow to "don't" and click on an item-level url 8) Note that the url opens in the current tab 9) Repeat the above steps 5-8 alternating "TrackClicks" between "Don't track" and either "Track" or "Track anonymously". Followed test plan. Works as expected. Signed-off-by: Marc VĂ©ron Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 410f795..3229b8c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1277,9 +1277,17 @@ [% IF ITEM_RESULT.uri %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + Link to resource + [% ELSE %] Link to resource + [% END %] [% ELSE %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% ITEM_RESULT.uri %] + [% ELSE %] [% ITEM_RESULT.uri %] + [% END %] [% END %] [% END %] -- 2.1.0