From 4de2c124775c7fae8bee1719d43227a7d93959a7 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 21 Jul 2015 13:09:39 +1000 Subject: [PATCH] [Signed-off] 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 --- 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 6799e23..6c668d4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1276,9 +1276,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 %] -- 1.7.10.4