]> git.koha-community.org Git - koha.git/commit
Bug 23566: Continue on device - with QR codes
authorOwen Leonard <oleonard@myacpl.org>
Wed, 25 Sep 2019 17:10:46 +0000 (17:10 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 1 Oct 2019 13:38:02 +0000 (14:38 +0100)
commit4c17151d74347da0f2ecfb9de49168162a2a21b6
tree8f81f2f642720994a48f1b31d66afd7c951a95a7
parentf2b844426782cb08ce8bd9d0b304a358b7548f86
Bug 23566: Continue on device - with QR codes

This patch adds the option to show a QR code on the OPAC bibliographic
detail page. The URL of the page is encoded in the image so that
scanning it will take the user to that page on their device. The feature
is controlled by a new system preference, OPACDetailQRCode, which is
disabled by default.

The QR Code is generated by a JavaScript library, "kjua"
(https://github.com/lrsjng/kjua), which has been added to the "About"
page in the staff client.

To test, apply the patch and run the database update. Rebuild the OPAC
CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - In the staff client, go to Administration -> System preferences.
 - Locate the OPACDetailQRCode system preferences under OPAC ->
   Features. It should be disabled.
   - Enable the preference and switch to the OPAC.
 - Locate a title in the catalog and view the detail page.
   - In the sidebar menu there should be a "Send to device" link.
   - Clicking the link should display a QR Code.
   - Scan the code using a QR Code-capable device.
   - The URL should be correct.
 - Disable the system preference and confirm that the "Send to device"
   link no longer appears on the OPAC detail page.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 files changed:
installer/data/mysql/atomicupdate/bug_23566.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/images/sprite.png
koha-tmpl/opac-tmpl/lib/kjua/kjua.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/kjua.min.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/lib/defaults.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/lib/dom.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/lib/draw.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/lib/draw_mode.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/lib/draw_rounded.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/kjua/lib/qrcode.js [new file with mode: 0644]