Bugzilla – Attachment 154452 Details for
Bug 6419
Add customizable areas to intranet home pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6419: (follow-up) Use Select2 with optgroups
Bug-6419-follow-up-Use-Select2-with-optgroups.patch (text/plain), 3.55 KB, created by
Owen Leonard
on 2023-08-16 08:24:39 UTC
(
hide
)
Description:
Bug 6419: (follow-up) Use Select2 with optgroups
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-08-16 08:24:39 UTC
Size:
3.55 KB
patch
obsolete
>From 93b149a335b315ed73be2175b1263a5ef121e2d8 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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. >--- > .../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 120bd055974..38123b72b89 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', 'StaffAcquisitionsHome', 'IntranetAuthoritiesHome', 'IntranetCataloguingHome', 'IntranetListsHome', 'IntranetPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] >- [% FOREACH l IN available_options.sort %] >- [% IF l == location %] >- <option value="[% l | html %]" selected="selected">[% l | html %]</option> >- [% ELSE %] >- <option value="[% l | html %]">[% l | html %]</option> >+ [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate' ] %] >+ <optgroup label="OPAC"> >+ [% FOREACH l IN opac_available_options.sort %] >+ [% IF l == location %] >+ <option value="[% l | html %]" selected="selected">[% l | html %]</option> >+ [% ELSE %] >+ <option value="[% l | html %]">[% l | html %]</option> >+ [% END %] > [% END %] >- [% END %] >+ </optgroup> >+ [% SET staff_available_options = [ 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] >+ <optgroup label="Staff"> >+ [% FOREACH l IN staff_available_options.sort %] >+ [% IF l == location %] >+ <option value="[% l | html %]" selected="selected">[% l | html %]</option> >+ [% ELSE %] >+ <option value="[% l | html %]">[% l | html %]</option> >+ [% END %] >+ [% END %] >+ </optgroup> > [% 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 %] > <script> >@@ -665,7 +678,7 @@ > stickTo: ".main", > stickyClass: "floating" > }); >- >+ $("#location").select2({ width: '50%' }); > }); > </script> > [% END %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6419
:
105255
|
108633
|
137787
|
137822
|
139501
|
154433
|
154434
|
154435
|
154436
|
154437
|
154441
|
154442
|
154443
|
154444
|
154445
|
154446
|
154447
|
154448
|
154449
|
154450
|
154451
|
154452
|
154519
|
154520
|
154521
|
154522
|
154523
|
154524
|
154525
|
154526
|
154527
|
155808
|
155809
|
155810
|
155811
|
155812
|
155813
|
155814
|
155815
|
155816
|
155839
|
155840
|
155841
|
155842
|
155843
|
155844
|
155845
|
155846
|
155847