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.
Created attachment 41104 [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".
Created attachment 42400 [details] [review] [Signed-off] 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>
Created attachment 42405 [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>
Created attachment 42407 [details] [review] Bug 14575: Fix OPACURLOpenInNewWindow There are some type fixed with this patch. This patch creates a TT var "target" to avoid c/p links.
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.
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.
Created attachment 44541 [details] [review] Bug 14575: Fix OPACURLOpenInNewWindow There are some type fixed with this patch. This patch creates a TT var "target" to avoid c/p links.
Created attachment 44546 [details] [review] Bug 14575: Fix OPACURLOpenInNewWindow There are some type fixed with this patch. This patch creates a TT var "target" to avoid c/p links. Signed-off-by: Marc Véron <veron@veron.ch>
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?
Created attachment 44641 [details] [review] Bug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow
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>
Created attachment 44685 [details] [review] Bug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
I have reduced the complexity of my followup, no need for another pair of eyes.
Patch and followups pushed to master. Thanks David and Jonathan!
This patch has been pushed to 3.20.x, will be in 3.20.6.
Pushed to 3.18.13, and released.
Created attachment 47864 [details] [review] Bug 14575 [QA Followup] - Make the use of TT a controllable switch, hide it behind a syspref