From b7fa695f68c85004ed86ce3f8baed4007e687dc0 Mon Sep 17 00:00:00 2001 From: Michael Skarupianski Date: Tue, 9 Apr 2024 14:00:15 +0000 Subject: [PATCH] Bug 36545: Use select2 in item search This patch modifies the multi-select fields in the item search to use the select2 framework. To test: 1. Apply patch 2. Go to staff interface -> "Item search" 3. Check item search form and search for - Home library - Current library - Shelving location - Item type - Collection - Status - Lost - Withdrawn - Damaged 4. Search with multiple variations (nothing selected, only one value, multiple values, ...) If no value is selected this means that "All" values are searched 5. Check that the search is working well Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Owen Leonard Signed-off-by: Michaela Sieber Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../prog/en/modules/catalogue/itemsearch.tt | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 6f5adc953f..eeb9145293 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -185,28 +185,28 @@
- [% INCLUDE form_field_select name="homebranch" options = branches empty_option = "All libraries" %] - [% INCLUDE form_field_select name="holdingbranch" options = branches empty_option = "All libraries" %] + [% INCLUDE form_field_select name="homebranch" options = branches %] + [% INCLUDE form_field_select name="holdingbranch" options = branches %] [% IF locations.size %] - [% INCLUDE form_field_select name="location" options = locations empty_option = "All locations" %] + [% INCLUDE form_field_select name="location" options = locations %] [% END %]
- [% INCLUDE form_field_select name="itype" options = itemtypes empty_option = "All item types" %] + [% INCLUDE form_field_select name="itype" options = itemtypes style="min-width:300px" %] [% IF ccodes.size %] - [% INCLUDE form_field_select name="ccode" options = ccodes empty_option = "All collection codes" %] + [% INCLUDE form_field_select name="ccode" options = ccodes %] [% END %] [% IF notforloans.size %] - [% INCLUDE form_field_select name="notforloan" options = notforloans empty_option = "All statuses" %] + [% INCLUDE form_field_select name="notforloan" options = notforloans %] [% END %] [% IF itemlosts.size %] - [% INCLUDE form_field_select name="itemlost" options = itemlosts empty_option = "All statuses" %] + [% INCLUDE form_field_select name="itemlost" options = itemlosts %] [% END %] [% IF withdrawns.size %] - [% INCLUDE form_field_select name="withdrawn" options = withdrawns empty_option = "All statuses" %] + [% INCLUDE form_field_select name="withdrawn" options = withdrawns %] [% END %] [% IF damageds.size %] - [% INCLUDE form_field_select name="damaged" options = damageds empty_option = "All statuses" %] + [% INCLUDE form_field_select name="damaged" options = damageds %] [% END %]
@@ -288,6 +288,7 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %] [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %] + [% INCLUDE 'select2.inc' %] [% END %] -- 2.39.5