From 050c173f6cb2570948fd9ff22e047ee750bd0270 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: Silvia Meakins Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- 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 f9aa9301d1..f906be23df 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 1bb20c536c..28d71badaa 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 25ce50d38e..7e4442477d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -289,6 +289,7 @@ $(document).ready(function() { }); [% INCLUDE 'js-date-format.inc' %] +[% INCLUDE 'js-biblio-format.inc' %] [% PROCESS jsinclude %] [% IF ( Koha.Preference('OPACUserJS') ) %]