From e815d1e010a20b73327cba1eaa78d08f06ec50a8 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=utf8 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 Signed-off-by: Tomas Cohen Arazi --- 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 410f795a4f..3229b8ca4e 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.39.5