There are several options on the advanced search page using which a user can refine/limit their search. Some of that content may be too technical or may not be relavant. By adding additional system preferences the librarians can control what to display on the OPAC advanced search page.
Maybe an easier way is to make sure all elements have proper id's and can be hidden using CSS?
I see following issues with CSS implementation as a solution for this. 1) The advanced search page has two options: Fewer Options and More Options. Both pages more or less contain the same content, thus hiding elements by giving them unique id's, on Fewer and More Options pages independently, is going to a bit tricky and clunky. 2) Library staff probably don't need to deal with CSS. It would be nice to have an integrated solution for all librarians implemented in Koha. I think adding controls to system preferences is the best solution as it gives librarians a chance to customize the advanced search page(s) to suit their patrons needs.
Created attachment 13385 [details] [review] Bug 9043 - Changes to the advanced search page Added system preferences to enable control of elements that are to be displayed on the advanced search page. * New system preferences were added to control the display of a) Publication date range b) Item type selection c) Language selection d) Location and Availability e) Sorting options f) Subtype limits elements. * This patch preserves the current default settings.
Created attachment 13858 [details] Typos in Advanced Search Options preferences I had to resolve conflicts in sysprefs.sql to appy the patch. It behaved as expected, I could turn off/on the display of the 6 sections. However, 2 syspreferenceshave a typo: OpacAdvSeachSorting and OpacAdvSeachSubtype See screenshot attached.
Created attachment 15312 [details] [review] Bug 9043 - Changes to the advanced search page Added system preferences to enable control of elements that are to be displayed on the advanced search page. * New system preferences were added to control the display of a) Publication date range b) Item type selection c) Language selection d) Location and Availability e) Sorting options f) Subtype limits elements. * This patch preserves the current default settings.
Fixed the typos and done some testing.
Created attachment 15328 [details] screenshot Hello, I applied this patch and tested. I see the sys prefs for all six options (with the typos corrected!). I tested each one by setting it to always, never, and only on More Options page and found everything to be working correctly. So I am going to add my signoff. However, I would like to point out one small cosmetic detail. Usually when looking at the advanced search page, you see this line at both the top and bottom of the screen: [Search] [More/Fewer Options] [New Search] Now if you set all six of these new sys prefs to only show on More Options page, when you're looking at the Fewer Options page, you see this line repeated twice with nothing in between, which looks a bit funny. I have added a screenshot so you can see what I mean. I wonder if it is possible to remove one of these in this case. Thanks, Melia
Created attachment 15329 [details] [review] [Signed off] Bug 9043 - Changes to the advanced search page Added system preferences to enable control of elements that are to be displayed on the advanced search page. * New system preferences were added to control the display of a) Publication date range b) Item type selection c) Language selection d) Location and Availability e) Sorting options f) Subtype limits elements. * This patch preserves the current default settings. Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
This patch works as expected but it adds a lot of sysprefs for just one thing. I will suggest 2 alternative patchs, for discussion. The idea is to improve the syspref's engine in order to create a new type which allow to selected several values for one syspref.
Created attachment 15546 [details] [review] [ALT 1/2] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref.
Created attachment 15547 [details] [review] [ALT 2/2] Bug 9043: Changes to the advanced search page New syspref: OpacAdvSearch. This syspref is multivalued and you can add or remove some elements on the adv search page.
Srikanth and Melia, Do you think my proposal solves the problem or not?
Hi Jonathan, I like the idea. But there are couple of issues I would like to raise 1) In the current state, the OpacAdvSearch syspref applies the same behavior to Advanced search page with both Fewer and More options. This needs to be rectified. 2) I tried unselecting/disabling a previously selected/enabled option by clicking on it, this doesn't seem to work. How does one unselect/disable one of the options from the scroll-down menu?
(In reply to comment #13) > Hi Jonathan, I like the idea. But there are couple of issues I would like to > raise > > 1) In the current state, the OpacAdvSearch syspref applies the same behavior > to Advanced search page with both Fewer and More options. This needs to be > rectified. Ok, I didn't understand what you want. New patch coming. > 2) I tried unselecting/disabling a previously selected/enabled option by > clicking on it, this doesn't seem to work. How does one unselect/disable one > of the options from the scroll-down menu? You have to press the ctrl key and click on the entry.
Created attachment 15792 [details] [review] Bug 9043: Changes to the advanced search page New syspref: OpacAdvSearch. This syspref is multivalued and you can add or remove some elements on the adv search page.
Need feedback on my last patch, switch to needs signoff.
Created attachment 19150 [details] [review] [ALT 1/2] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref.
Created attachment 19151 [details] [review] [ALT 2/2] Bug 9043: Changes to the advanced search page New syspref: OpacAdvSearch. This syspref is multivalued and you can add or remove some elements on the adv search page.
Note: The 3 patches are not compatible. Either you apply: [Signed off] Bug 9043 - Changes to the advanced search page Either both: [ALT 1/2] Bug 9043: Syspref improvement: add new type "multiple" [ALT 2/2] Bug 9043: Changes to the advanced search page
Jonathan, your patches work quite well, but there is no way to disable all the options at once. When I deslect them all, and hit the save button, I get the "Nothing to save" message. Not required, but it might be nice to implement something like https://code.google.com/p/dropdown-check-list/ as a fair number of people may not know about ctrl-click to select/deselect individual items.
Created attachment 20316 [details] [review] [ALT 1/3] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. http://bugs.koha-community.org/show_bug.cgi?id=9456
Created attachment 20317 [details] [review] [ALT 2/3] Bug 9043: Changes to the advanced search page New syspref: OpacAdvSearch. This syspref is multivalued and you can add or remove some elements on the adv search page.
Created attachment 20318 [details] [review] [ALT 3/3] Bug 9043: Add the dropdown check list jquery plugin
(In reply to Kyle M Hall from comment #20) > Jonathan, your patches work quite well, but there is no way to disable all > the options at once. When I deslect them all, and hit the save button, I get > the "Nothing to save" message. > > Not required, but it might be nice to implement something like > https://code.google.com/p/dropdown-check-list/ as a fair number of people > may not know about ctrl-click to select/deselect individual items. Thank for the idea, done! I cannot reproduce your issue, but should be fixed by the last patch.
[ALT 2/3] Bug 9043: Changes to the advanced search page (6.67 KB, patch) 2013-08-13 14:59 UTC, Jonathan Druart Failed to apply. Applying: Bug 9043: Changes to the advanced search page Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Failed to merge in the changes.
Created attachment 20717 [details] [review] [ALT 2/3] Bug 9043: Changes to the advanced search page New syspref: OpacAdvSearch. This syspref is multivalued and you can add or remove some elements on the adv search page.
Created attachment 20718 [details] [review] [ALT 3/3] Bug 9043: Add the dropdown check list jquery plugin
Found a bug: When you deselect all options from a 'multiple' syspref. The '(modified)' text is displayed but clicking on "Save" button doesn't save the syspref value and message "Nothing to save" appears.
Forget that, I cleared my browser cache and it works!
Applying: Bug 9043 - Changes to the advanced search page Using index info to reconstruct a base tree... M installer/data/mysql/sysprefs.sql M installer/data/mysql/updatedatabase.pl M koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref M koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt M opac/opac-search.pl Falling back to patching base and 3-way merge... Auto-merging opac/opac-search.pl Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref Auto-merging installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Patch failed at 0001 Bug 9043 - Changes to the advanced search page The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Created attachment 21643 [details] [review] [ALT 1/3] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref.
Created attachment 21644 [details] [review] [ALT 2/3] Bug 9043: Changes to the advanced search page New syspref: OpacAdvSearch. This syspref is multivalued and you can add or remove some elements on the adv search page.
Created attachment 21645 [details] [review] [ALT 3/3] Bug 9043: Add the dropdown check list jquery plugin
Could it be possible to get some feedback on my proposed patches? The idea was not to block the enh but to improve it!
<h1>Something went wrong !</h1>Applying: Bug 9043 - Changes to the advanced search page Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt Auto-merging opac/opac-search.pl Failed to merge in the changes. Patch failed at 0001 Bug 9043 - Changes to the advanced search page When you have resolved this problem run git bz apply --continue. If you would prefer to skip this patch, instead run git bz apply --skip. To restore the original branch and stop patching run git bz apply --abort. Bug 9043 - Adding system preferences to control the visibility of the content on the Advanced Search page 15329 - [Signed off] Bug 9043 - Changes to the advanced search page 21643 - [ALT 1/3] Bug 9043: Syspref improvement: add new type multiple 21644 - [ALT 2/3] Bug 9043: Changes to the advanced search page 21645 - [ALT 3/3] Bug 9043: Add the dropdown check list jquery plugin
You cannot test this in a sandbox, the first patch should not be applied.
(In reply to Jonathan Druart from comment #35) > Could it be possible to get some feedback on my proposed patches? The idea > was not to block the enh but to improve it! _One_ It appears that one of your patches includes the smart match operator, which is something we're avoiding due to its deprecated/experimental status in Perl 5.18, I believe. _Two_ Do you have a test plan to accompany your patches, Jonathan? It seems that the concept behind your patch and the original are at odds in that the original allows finer control of when the options appear. In yours, it appears that the options always show when viewing "more options" and only show when viewing "fewer options" if that option is included in the system preference. I think the idea was to choose between 3 scenarios: 1) Never show the option in advanced search 2) Show it when viewing "more" and "fewer" 3) Show it only when viewing "more" I think your patch only covers scenarios #2 and #3. Is that correct? I'm not a huge fan of governing this behaviour using system preferences, but I think I prefer the 3 choices rather than 2. _Three_ I think Owen has been making an effort to move the Javascript libraries out of the /en/ directory and put it higher up so that it isn't needlessly duplicated in the translations, so it would probably make sense to move the JS higher up the directory tree. _Four_ I think there might be another bug out there that seeks to add multiple options for system preferences...but I might be mistaken. _Five_ It looks like this patch will need to rebase due to the updatedatabase.pl being too old now. --- I hope that helps!
(In reply to David Cook from comment #38) Thanks David to revive this bug! > It appears that one of your patches includes the smart match operator, which > is something we're avoiding due to its deprecated/experimental status in > Perl 5.18, I believe. Will be fixed. > Do you have a test plan to accompany your patches, Jonathan? Will be added. > In yours, it > appears that the options always show when viewing "more options" and only > show when viewing "fewer options" if that option is included in the system > preference. > I think your patch only covers scenarios #2 and #3. Is that correct? Yes, good catch. I will add a new pref for that. > I'm not a huge fan of governing this behaviour using system preferences, but > I think I prefer the 3 choices rather than 2. I don't see another way to do that. > I think Owen has been making an effort to move the Javascript libraries out > of the /en/ directory and put it higher up so that it isn't needlessly > duplicated in the translations, so it would probably make sense to move the > JS higher up the directory tree. At the OPAC, not at the staff interface. > I think there might be another bug out there that seeks to add multiple > options for system preferences...but I might be mistaken. Not sure. If someone agree with my patches, I think the first patch should be abandoned. Otherwise, We are going to create 6 prefs and remove them just after. > It looks like this patch will need to rebase due to the updatedatabase.pl > being too old now. Will be rebased. > I hope that helps! Of course!
Created attachment 27524 [details] [review] [ALT 1/3] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref.
Created attachment 27525 [details] [review] [ALT 2/3] Bug 9043: Add the dropdown check list jquery plugin
Created attachment 27526 [details] [review] [ALT 3/3] Bug 9043: Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme.
This patch works well : adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. There is just one thing to remember when configuring the advance search options : When you fill OpacAdvSearchOptions with Item types and Languages (for example)you should fill also OpacAdvSearchMoreOptions with the same options : Item types, Languages, otherwise, when you click on more options, you get fiewer options (the options filled in OpacAdvSearchOptions are not showed)which is quite surprising, it's a logical mistake in configuring the advance search options : more options must be filled with at least the options filled in the default options.
Created attachment 29005 [details] [review] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Created attachment 29006 [details] [review] Bug 9043: Add the dropdown check list jquery plugin Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Created attachment 29007 [details] [review] Bug 9043: Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
*** Bug 6567 has been marked as a duplicate of this bug. ***
Created attachment 29914 [details] [review] Bug 9043: [SIGNED OFF] Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 29915 [details] [review] Bug 9043: [SIGNED-OFF] Add the dropdown check list jquery plugin Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 29916 [details] [review] Bug 9043: [SIGNED-OFF] Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Please add a follow-up to include the new jQuery plugin on the About page. Continuing testing...
I think maybe rename location to 'location and availability' like on the advanced search form and to avoid confusion with the locations tab that you can add with AdvancedSearchTypes.
Created attachment 29945 [details] [review] Bug 9043: [SIGNED-OFF] Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 29946 [details] [review] Bug 9043: Add the dropdown check list jquery plugin in the license list. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(In reply to Katrin Fischer from comment #51) > Please add a follow-up to include the new jQuery plugin on the About page. Done. (In reply to Katrin Fischer from comment #52) > I think maybe rename location to 'location and availability' like on the > advanced search form and to avoid confusion with the locations tab that you > can add with AdvancedSearchTypes. Done too, I amended the last patch and just changed the string in opac.pref.
There are 2 small things: - we might want to rename "Itemtypes" as it could also be locations or collections for a library. But I am not sure what would be a better name :( - the font size and script of the new plugin created pull down seems a bit off and some styling to make it fit better into the page would be nice. Overall this works as it should and I think those 2 small things could be resolved in a follow-up.
Created attachment 30183 [details] [review] [PASSED QA] Bug 9043: [SIGNED OFF] Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 30184 [details] [review] [PASSED QA] Bug 9043: [SIGNED-OFF] Add the dropdown check list jquery plugin Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 30185 [details] [review] [PASSED QA] Bug 9043: [SIGNED-OFF] Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 30186 [details] [review] [PASSED QA] Bug 9043: Add the dropdown check list jquery plugin in the license list. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA scipt. Note: - We might want to rename "Itemtypes" as it could also be locations or collections for a library. But I am not sure what would be a better name. - The font size and script of the new plugin created pull down seems a bit off and some styling to make it fit better into the page would be nice.
I'm concerned about adding a jQuery plugin dependency that comes with this disclaimer: "DDCL IS NO LONGER ACTIVELY SUPPORTED It has not been rebuilt in over 2 years and is stuck on jQuery release 1.7. However, if anybody feels they can devote time to maintaining and developing DDCL, then feel free to get in contact." We are still in the process of updating or replacing existing plugins which block an upgrade of jQuery in Koha. I don't think it's a good idea to add another one. Are there any alternatives we could consider?
I haven't tested it but this looks interesting: http://wenzhixin.net.cn/p/multiple-select/docs/
Hi Owen, thx for taking a look and finding this. I hope we find a solution that won't block the update.
Created attachment 30967 [details] [review] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 30968 [details] [review] Bug 9043: Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 30969 [details] [review] Bug 9043: Add the multiple select jquery plugin Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(In reply to Owen Leonard from comment #62) > I haven't tested it but this looks interesting: > > http://wenzhixin.net.cn/p/multiple-select/docs/ The last patch set uses this multiple select plugin.
This works as described, but introduces a couple of untranslatable strings - Select all, All selected, x of y selected etc. Marking failed for now, hoping there is a solution.
(In reply to Katrin Fischer from comment #68) > This works as described, but introduces a couple of untranslatable strings - > Select all, All selected, x of y selected etc. > > Marking failed for now, hoping there is a solution. The solution would be to modify the multiple-select plugin. Since the strings are only displayed when editing 2 sysprefs, I am not sure it is worth forking it.
(In reply to Jonathan Druart from comment #69) > The solution would be to modify the multiple-select plugin. This worked in my test: $("select[multiple='multiple']").multipleSelect({ placeholder: _("Please select..."), selectAllText: _("Select all"), allSelected: _("All selected"), countSelected: _("# of % selected"), noMatchesFound: _("No matches found") }); ...and the translation script seemed to pick it up.
Created attachment 31170 [details] [review] Bug 9043: Make strings translatable Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 31557 [details] [review] [PASSED QA] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 31558 [details] [review] [PASSED QA] Bug 9043: Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 31559 [details] [review] [PASSED QA] Bug 9043: Add the multiple select jquery plugin Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 31560 [details] [review] [PASSED QA] Bug 9043: Make strings translatable Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 31561 [details] [review] [PASSED QA] Bug 9043 [QA Followup] - Don't show "More options" are there aren't any Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Everything looks good. Passes koha-qa, tested and functions well. Had to rebase due to updates to the advanced search template. Added small qa followup to keep this train rolling. Great work Jonathan!
Created attachment 33428 [details] [review] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33429 [details] [review] Bug 9043: Changes to the advanced search page This patch adds 2 new sysprefs: OpacAdvSearchOptions and OpacAdvSearchMoreOptions. These sysprefs are multivalued and you can add or remove some elements on the adv search page. This patch allows to display/hide some entries in the advanced search page at the OPAC. On this way, it is possible to configure the search options to display. Test plan: 1/ Fill OpacAdvSearchOptions with Item types and Languages. Fill OpacAdvSearchMoreOptions with Item types, Languages and Location. On the advanced search page, verify the Location is only displayed for the "More options" view. 2/ Try different settings for these prefs 3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that the "More options" does not displayed additional options. 4/ Remove all entries for the OpacAdvSearchOptions and verify that the "normal view" does not displayed any options. Note that this patch only affects the bootstrap theme. Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33430 [details] [review] Bug 9043: Add the multiple select jquery plugin Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33431 [details] [review] Bug 9043: Make strings translatable Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33432 [details] [review] Bug 9043 [QA Followup] - Don't show "More options" are there aren't any Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patches pushed to master. Thanks Jonathan! Nice addition!
Created attachment 33617 [details] [review] Bug 9043: The comma (,) should be kept to separate multi-valuated prefs The prefs language and opaclanguages used the comma to separate the different values. The new prefs OpacAdvSearchMoreOptions and OpacAdvSearchOptions should do the same. To reproduce the issue: update the language pref (or opaclanguages) and refresh the page. => The pref values are not checked anymore and the language selection (bottom of the page) does not appear. Test plan: 1/ Verify that the behavior described above is fixed. 2/ Verify that the original test plan of bug 9043 still passes. Note: The 2 OpacAdvSearchMoreOptions and OpacAdvSearchOptions pref values are overwritten but the feature have just been pushed recently. It should not affect a production environment.
Created attachment 33620 [details] [review] [SIGNED-OFF] Bug 9043: The comma (,) should be kept to separate multi-valuated prefs The prefs language and opaclanguages used the comma to separate the different values. The new prefs OpacAdvSearchMoreOptions and OpacAdvSearchOptions should do the same. To reproduce the issue: update the language pref (or opaclanguages) and refresh the page. => The pref values are not checked anymore and the language selection (bottom of the page) does not appear. Test plan: 1/ Verify that the behavior described above is fixed. 2/ Verify that the original test plan of bug 9043 still passes. Note: The 2 OpacAdvSearchMoreOptions and OpacAdvSearchOptions pref values are overwritten but the feature have just been pushed recently. It should not affect a production environment. Signed-off-by: Owen Leonard <oleonard@myacpl.org> I was able to reproduce the issue and verify that this patch corrected the problem. Langage selection and OpacAdvSearchOptions worked correctly.
Followup pushed to master. Thanks Jonathan and Owen for the fast response!
Created attachment 33947 [details] [review] Bug 9043: Add a wonderful image This patch adds the missing multiple-select.png image. Test plan: - search the pref 'advsearch' - without this patch, you get a 404 error for the image - with this patch, you don't get the error but a wonderful image on the right of the "multiple" pref
Minor followup pushed to master. Thanks Jonathan!