The AdvancedSearchTypes system preference asks for pipe-delimited text, which isn't very user-friendly. We can use a multiple-select widget (as used for OpacAdvSearchOptions for example) to allow the user to select one or more predefined options.
Created attachment 129429 [details] [review] Bug 29878: Use multiple select widget for AdvancedSearchTypes system preference This patch updates system preferences so that the AdvancedSearchTypes preference uses a multiple-select widget. This lets users select one or more checkboxes in a dropdown rather than requiring that they enter pipe-delimited text. To test, apply the patch and run updatedatabase. - Go to Administration -> System Preferences and search for 'AdvancedSearchTypes' - The input should be styled as a multiple-select widget. Test that you can select one, more, or all of the options. - Test that your selections are saved successfully and that the changes are reflected on the OPAC and staff interface advanced search pages.
Created attachment 129431 [details] [review] Bug 29878: Use multiple select widget for AdvancedSearchTypes system preference This patch updates system preferences so that the AdvancedSearchTypes preference uses a multiple-select widget. This lets users select one or more checkboxes in a dropdown rather than requiring that they enter pipe-delimited text. To test, apply the patch and run updatedatabase. - Go to Administration -> System Preferences and search for 'AdvancedSearchTypes' - The input should be styled as a multiple-select widget. Test that you can select one, more, or all of the options. - Test that your selections are saved successfully and that the changes are reflected on the OPAC and staff interface advanced search pages. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 129603 [details] [review] Bug 29878: Use multiple select widget for AdvancedSearchTypes system preference This patch updates system preferences so that the AdvancedSearchTypes preference uses a multiple-select widget. This lets users select one or more checkboxes in a dropdown rather than requiring that they enter pipe-delimited text. To test, apply the patch and run updatedatabase. - Go to Administration -> System Preferences and search for 'AdvancedSearchTypes' - The input should be styled as a multiple-select widget. Test that you can select one, more, or all of the options. - Test that your selections are saved successfully and that the changes are reflected on the OPAC and staff interface advanced search pages. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129963 [details] [review] Bug 29878: (follow-up) Fix opac-topissues.pl This page is using the preference AdvancedSearchTypes with wrong split character Test plan : 1) Enable preference OpacTopissue 2) In OPAC click on 'Most popular' 3) Check you see filters on ccode and/or itemtype when they are in AdvancedSearchTypes
Created attachment 129964 [details] [review] Bug 29878: (follow-up) Change system preference type to multiple AdvancedSearchTypes type must be changed from 'Choice' to 'multiple'. 'Choice' was in fact not the correct type. Also fix options even if they are useless. Other multiple preferences set them. Also replaces split /\,/ with /,/ There is no need to escape.
This needs a bit more work. We see in preference description (searching.pref) : Tabs appear in the order listed. Looks like it is not valid : Values defined in preference are 'itemtypes,ccode,loc' I see in system preference page : Collection Item type Shelving location Is it alphabetical ? When I select all and save value changes to 'ccode,itemtypes,loc'; Values can not be ordered anymore, we should remove this text.
I don't think we should remove the ability to have the tabs appear in the order the library likes. If we can't do this with the multi select, we should not use it. Could we do something similar like we have for the languages? You can check/uncheck and order them.
It does work in 20.11: ccode|loc|itemtypes makes the tabs appear in this order in the OPAC.