From 07331db2d731c4b7bad361fa91e39b45ebd339de 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 --- .../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 d1ae542414..459b9a716c 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 @@ -494,19 +494,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.30.2