Bug 34865

Summary: Syspref OPACURLOpenInNewWindow not working for Library URLs
Product: Koha Reporter: Klas Blomberg <klas.blomberg>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, kelly
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:
23.11.00
Circulation function:
Attachments: Bug 34865: Use OPACURLOpenInNewWindow for library URLs
Bug 34865: Use OPACURLOpenInNewWindow for library URLs
Bug 34865: Use OPACURLOpenInNewWindow for library URLs

Description Klas Blomberg 2023-09-21 14:26:48 UTC
The syspref OPACURLOpenInNewWindow is not working for URLs entered in Administration>Libraries>...>URL

Links to the libraries homepages opens in same window, in spite of being external links. 

This bug affects both the library listing:
https://bibliotekmellansjo.se/cgi-bin/koha/opac-library.pl

and library names in catalogue records:
https://bibliotekmellansjo.se/cgi-bin/koha/opac-detail.pl?biblionumber=443905
Comment 1 Owen Leonard 2023-09-25 13:48:47 UTC
Created attachment 156165 [details] [review]
Bug 34865: Use OPACURLOpenInNewWindow for library URLs

If a library has a URL defined it is shown in the OPAC under the
libraries page. This patch updates the template so that the link
respects the OPACURLOpenInNewWindow system preference.

To test, apply the patch and go to Administration -> Libraries and edit
a library if necessary so that it has a URL defined.

In the OPAC, go to the Libraries page. Test that the library link
respects whichever setting you have for OPACURLOpenInNewWindow
Comment 2 ByWater Sandboxes 2023-09-26 13:49:27 UTC
Created attachment 156228 [details] [review]
Bug 34865: Use OPACURLOpenInNewWindow for library URLs

If a library has a URL defined it is shown in the OPAC under the
libraries page. This patch updates the template so that the link
respects the OPACURLOpenInNewWindow system preference.

To test, apply the patch and go to Administration -> Libraries and edit
a library if necessary so that it has a URL defined.

In the OPAC, go to the Libraries page. Test that the library link
respects whichever setting you have for OPACURLOpenInNewWindow

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 3 Lucas Gass (lukeg) 2023-09-26 20:48:44 UTC
Created attachment 156247 [details] [review]
Bug 34865: Use OPACURLOpenInNewWindow for library URLs

If a library has a URL defined it is shown in the OPAC under the
libraries page. This patch updates the template so that the link
respects the OPACURLOpenInNewWindow system preference.

To test, apply the patch and go to Administration -> Libraries and edit
a library if necessary so that it has a URL defined.

In the OPAC, go to the Libraries page. Test that the library link
respects whichever setting you have for OPACURLOpenInNewWindow

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-10-04 13:33:40 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-10-05 20:14:10 UTC
Enhancement not pushed to 23.05.x
In order to avoid behavior change in a stable version