]> git.koha-community.org Git - koha.git/commit
Bug 37391: Make QR code for bibliographic record in OPAC use canonical link main
authorMichał Kula <148193449+mkibp@users.noreply.github.com>
Wed, 17 Jul 2024 11:42:36 +0000 (11:42 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 24 Oct 2024 14:56:01 +0000 (16:56 +0200)
commit650d419a742ffdf237420d3678ae512f034f2ad7
treed676bbb10138256b451f80648e56c932f3dd42c9
parentb3bf52fefaa44003a4d2f7f708aeb775df84e7c9
Bug 37391: Make QR code for bibliographic record in OPAC use canonical link

In /opac-detail.pl page there's an option to show a QR code to open up
said record on your phone or share it with others in such a way.

Currently, it simply uses the current `location.href` of the browser.
This isn't ideal, because such URL can be much longer, resulting in
more complex/harder to scan QR code, plus URL parameters can contain
extra junk, such as our previous search query that led us to current
record, which we might not necessarily want to share.

Thus, now having simple canonical URLs after the "Depends On" patch was
merged in, we can replace these QR codes to link to them instead.

To test:
1. Visit biblio detail page in OPAC
2. Click the button to show QR code in the right pane (preference
   'OPACDetailQRCode' must be enabled)
3. Notice that the QR code is much simpler/less complex now
4. Scan the QR code with your phone and confirm it's in the desired
   format of <URL>/bib/123 and that it opens up properly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt