From 9ec1bd1a1033f9573814468c5764c4cacaa77452 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 29 Apr 2021 08:53:43 -0300 Subject: [PATCH] Bug 28261: Add visual feedback on overridden pickup locations on patron's page This patch makes the patron pages in the staff interface use the API and Select2 to render the pickup locations list. This has the effect of adding visual feedback on those pickup locations that need an override, based on the current configuration options. All the checks are done in the GET /holds/:hold_id/pickup_locations route, so this is a fairly trivial change. To test: 1. Have a couple holds for a patron, some overrriden, some not 2. Visit the patrons' detail page, holds tab. => SUCCESS: You see the holds, pickup location has a dropdown 3. Repeat in the circulation tab for the patron => SUCCESS: You see the holds, pickup location has a dropdown 4. Apply this patch 5. Repeat 2 and 3 => SUCCESS: Same behavior as before, but the dropdown is rendered with Select2 and has a search feature. Overridden pickup locations have an icon telling so 6. Sign off :-D Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- .../prog/en/modules/circ/circulation.tt | 1 + .../prog/en/modules/members/moremember.tt | 1 + koha-tmpl/intranet-tmpl/prog/js/holds.js | 57 ++++++++++++++++++- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 1771a941f0..6e7aa020de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -967,6 +967,7 @@ [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] [% INCLUDE 'timepicker.inc' %] + [% INCLUDE 'select2.inc' %] [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]