From e6224288a9f0a81749338aeaf31f5cc576c1013a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 24 Jan 2023 12:22:34 +0000 Subject: [PATCH] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Signed-off-by: Kyle M Hall --- api/v1/swagger/paths/items.yaml | 1 + .../en/includes/js-biblio-format.inc | 64 +++++++++++++++++++ .../bootstrap/en/includes/modals/checkout.inc | 4 +- .../bootstrap/en/includes/opac-bottom.inc | 1 + koha-tmpl/opac-tmpl/bootstrap/js/global.js | 14 ++++ .../opac-tmpl/bootstrap/js/modals/checkout.js | 23 +++++-- 6 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/js-biblio-format.inc diff --git a/api/v1/swagger/paths/items.yaml b/api/v1/swagger/paths/items.yaml index ac8c313a14..2a1591ec44 100644 --- a/api/v1/swagger/paths/items.yaml +++ b/api/v1/swagger/paths/items.yaml @@ -426,6 +426,7 @@ type: string enum: - +strings + - biblio collectionFormat: csv consumes: - application/json diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/js-biblio-format.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/js-biblio-format.inc new file mode 100644 index 0000000000..77c2fe5c18 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/js-biblio-format.inc @@ -0,0 +1,64 @@ + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/checkout.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/checkout.inc index 6a19e717de..615345ef77 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/checkout.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/checkout.inc @@ -19,6 +19,8 @@ Barcode + Title + Call number Due date @@ -26,7 +28,7 @@ - items checked out + items checked out diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 518aed4e24..5f8cf1a50e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -295,6 +295,7 @@ $(document).ready(function() { }); [% INCLUDE 'js-date-format.inc' %] +[% INCLUDE 'js-biblio-format.inc' %] [% PROCESS jsinclude %] [% IF ( Koha.Preference('OPACUserJS') ) %]