From f596a474171193543da9d573e787f7e55a1ddd29 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 16 Aug 2023 08:20:35 +0000 Subject: [PATCH] Bug 6419: (follow-up) Use Select2 with optgroups This patch divides the OPAC and staff options into separate optgroups and adds Select2 for styling and filtering. THe patch also corrects a few missed instances of "Intranet" in the list of location options on the entry form. Signed-off-by: Caroline Cyr La Rose Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi --- .../en/modules/tools/additional-contents.tt | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index bbb9001a1b..f76683941a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -523,19 +523,32 @@ [% END %] [% END %] [% ELSE %] - [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] - [% FOREACH l IN available_options.sort %] - [% IF l == location %] - - [% ELSE %] - + [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', ] %] + + [% FOREACH l IN opac_available_options.sort %] + [% IF l == location %] + + [% ELSE %] + + [% END %] [% END %] - [% END %] + + [% SET staff_available_options = [ 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] + + [% FOREACH l IN staff_available_options.sort %] + [% IF l == location %] + + [% ELSE %] + + [% END %] + [% END %] + [% END %] [% END %] [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'select2.inc' %] [% Asset.js("js/tools-menu.js") | $raw %] [% Asset.js("lib/hc-sticky.js") | $raw %] [% END %] -- 2.39.5