Bug 14575

Summary: OPACURLOpenInNewWindow should apply to item-level urls too
Product: Koha Reporter: David Cook <dcook>
Component: OPACAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: f.demians, jonathan.druart, katrin.fischer, kyle, liz, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14575 - OPACURLOpenInNewWindow should apply to item-level urls too
[Signed-off] Bug 14575 - OPACURLOpenInNewWindow should apply to item-level urls too
Bug 14575 - OPACURLOpenInNewWindow should apply to item-level urls too
Bug 14575: Fix OPACURLOpenInNewWindow
Bug 14575: Fix OPACURLOpenInNewWindow
Bug 14575: Fix OPACURLOpenInNewWindow
Bug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow
Bug 14575 - OPACURLOpenInNewWindow should apply to item-level urls too
Bug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow
Bug 14575: Fix typo in opac-basket.tt
Bug 14575 [QA Followup] - Make the use of TT a controllable switch, hide it behind a syspref

Description David Cook 2015-07-21 03:01:09 UTC
When OPACURLOpenInNewWindow is activated, item-level urls on the OPAC detail page should open in a new tab as well as the urls at the bib-level.
Comment 1 David Cook 2015-07-21 03:14:22 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-09-04 13:47:50 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-09-04 14:02:19 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-09-04 14:23:31 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-09-04 14:24:47 UTC
Well, I am stealing this bug report. I have found bugs on opac-detail, some links don't open in a new tab/window.
It was caused by a typo in the pref name.

Please add a signoff on this second patch.
Comment 6 Liz Rea 2015-11-06 02:10:31 UTC
Hi Jonathan,

On your last patch here, I got:

fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Comment 7 Jonathan Druart 2015-11-06 10:14:30 UTC Comment hidden (obsolete)
Comment 8 Marc Véron 2015-11-06 10:49:38 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-11-08 21:34:33 UTC
Some tests are failing:

perl xt/tt_valid.t 
1..3
not ok 1 - TT syntax: not using TT directive within HTML tag
#   Failed test 'TT syntax: not using TT directive within HTML tag'
#   at xt/tt_valid.t line 91.
# Files list: 
# opac-tmpl/bootstrap/en/modules/opac-detail.tt: 347, 349, 518, 1276, 1278
ok 2 - <body> tag with id and class attributes
ok 3 - Token received same as original put on stack
# Looks like you failed 1 test of 3.

Can you please take a look?
Comment 10 Jonathan Druart 2015-11-09 11:01:20 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2015-11-10 09:07:36 UTC
Created attachment 44684 [details] [review]
Bug 14575 - OPACURLOpenInNewWindow should apply to item-level urls too

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 <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2015-11-10 09:07:39 UTC
Created attachment 44685 [details] [review]
Bug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2015-11-10 09:07:43 UTC
Created attachment 44686 [details] [review]
Bug 14575: Fix typo in opac-basket.tt

No more typo in the codebase.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2015-11-10 09:08:13 UTC
I have reduced the complexity of my followup, no need for another pair of eyes.
Comment 15 Tomás Cohen Arazi 2015-11-10 12:50:23 UTC
Patch and followups pushed to master.

Thanks David and Jonathan!
Comment 16 Frédéric Demians 2015-11-29 20:48:20 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 17 Liz Rea 2016-01-06 21:20:24 UTC
Pushed to 3.18.13, and released.
Comment 18 Kyle M Hall 2016-02-10 18:46:19 UTC Comment hidden (obsolete)