From f8d195130de31290a60cad953e4e3cc05707b36f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 29 Sep 2021 15:17:38 +0100 Subject: [PATCH] Bug 29002: Add ability to book material This patch introduces a new modal to the biblio details page to allow booking of materials. Test plan 1) Navigate to the details page of a biblio 2) Note the new 'Place booking' button in the toolbar 3) Click the new button and note the new modal dialogue 4) Enter part of a patron name or cardnumber and then select from the presented results 5) Select a start date and end date from the calender 6) Submit --- .../prog/en/includes/cat-toolbar.inc | 4 + .../prog/en/includes/modals/place_booking.inc | 42 ++++++ .../prog/en/modules/catalogue/detail.tt | 4 + .../prog/js/place_booking_modal.js | 129 ++++++++++++++++++ 4 files changed, 179 insertions(+) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index e194411af5..62a8736102 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -189,6 +189,8 @@ [% END %] [% END %] +
+ [% IF Koha.Preference('ArticleRequests') %]
Request article
[% END %] @@ -239,3 +241,5 @@ + + [% INCLUDE modals/place_booking.inc %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc new file mode 100644 index 0000000000..77a2d5bda2 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc @@ -0,0 +1,42 @@ + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 7c2b961d6c..c47bf399cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1022,6 +1022,9 @@ Note that permanent location is a code, and location may be an authval. [% MACRO jsinclude BLOCK %] [% INCLUDE 'catalog-strings.inc' %] + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'select2.inc' %] + [% INCLUDE 'js-date-format.inc' %] [% Asset.js("js/catalog.js") | $raw %] [% Asset.js("js/coce.js") | $raw %] [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %] @@ -1317,6 +1320,7 @@ Note that permanent location is a code, and location may be an authval. [% INCLUDE 'columns_settings.inc' %] [% Asset.js("js/browser.js") | $raw %] [% Asset.js("js/table_filters.js") | $raw %] + [% Asset.js("js/place_booking_modal.js") | $raw %]