It would be useful to be able to have the search groups be available from the library pull-down in addition to the advanced search.
Created attachment 13980 [details] [review] Bug 9257 - Add "groups" to normal search pulldown This patch adds the ability to add groups to the library select pulldown on the opac, if it is enabled. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Go to Administration › Libraries and groups 4) Create a new group, or edit an existing one 5) Ensure the 'Show in search pulldown' checkbox is checked 6) Save the group 7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled 8) Load the OPAC, try the group search from the libraries pulldown menu
It looks like this functionality depends on the user having JavaScript enabled. Generally speaking functionality which requires JavaScript should degrade gracefully: If it doesn't work without JS it should not be present for JS-disabled users. I would love to see a solution which used <optgroup> instead of a disabled <option> to organize the options. Could we perhaps prepend the group name with a specific string which could be parsed by the search script in order to be understood as a group instead of a single library?
Created attachment 14364 [details] [review] Bug 9257 - Add "groups" to normal search pulldown This patch adds the ability to add groups to the library select pulldown on the opac, if it is enabled. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Go to Administration › Libraries and groups 4) Create a new group, or edit an existing one 5) Ensure the 'Show in search pulldown' checkbox is checked 6) Save the group 7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled 8) Load the OPAC, try the group search from the libraries pulldown menu
Created attachment 14365 [details] [review] Bug 9257 - Add "groups" to normal search pulldown - Followup
Thanks for the ideas! This new followup implements them all and the feature will no longer need JavaScript. (In reply to comment #2) > It looks like this functionality depends on the user having JavaScript > enabled. Generally speaking functionality which requires JavaScript should > degrade gracefully: If it doesn't work without JS it should not be present > for JS-disabled users. > > I would love to see a solution which used <optgroup> instead of a disabled > <option> to organize the options. > > Could we perhaps prepend the group name with a specific string which could > be parsed by the search script in order to be understood as a group instead > of a single library?
This seems to be working, but I noticed the update message in updatedatabase.pl seems to be copy-paste from another patch. I also still see JavaScript in the template. Is that still doing something? Can it be removed?
Created attachment 15279 [details] [review] Bug 9257 - Add "groups" to normal search pulldown This patch adds the ability to add groups to the library select pulldown on the opac, if it is enabled. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Go to Administration › Libraries and groups 4) Create a new group, or edit an existing one 5) Ensure the 'Show in search pulldown' checkbox is checked 6) Save the group 7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled 8) Load the OPAC, try the group search from the libraries pulldown menu
(In reply to comment #6) > This seems to be working, but I noticed the update message in > updatedatabase.pl seems to be copy-paste from another patch. Fixed! > I also still see JavaScript in the template. Is that still doing something? > Can it be removed? I believe all the js was removed by the followup, I've squashed the two patches together for easier reading ( and the fact that separate patches was unnecessary ).
*** Bug 9794 has been marked as a duplicate of this bug. ***
I went to apply this - updatedatabase fails because of the quotes in the update description. I fixed that and if it passes my testing I'll upload that patch instead of the original.
Hi Kyle, I'm sorry to say I can't seem to get this to work - I can add the value for show_in_pulldown ok, but I can't seem to get the groups to show in the masthead pulldown - they simply are not there. The patch seems to apply ok otherwise (excepting the quotes around groups in updatedatabase)
Created attachment 16074 [details] [review] Bug 9257 - Add "groups" to normal search pulldown This patch adds the ability to add groups to the library select pulldown on the opac, if it is enabled. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Go to Administration › Libraries and groups 4) Create a new group, or edit an existing one 5) Ensure the 'Show in search pulldown' checkbox is checked 6) Save the group 7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled 8) Load the OPAC, try the group search from the libraries pulldown menu
Created attachment 16077 [details] [review] Bug 9257 - Add "groups" to normal search pulldown This patch adds the ability to add groups to the library select pulldown on the opac, if it is enabled. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Go to Administration › Libraries and groups 4) Create a new group, or edit an existing one 5) Ensure the 'Show in search pulldown' checkbox is checked 6) Save the group 7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled 8) Load the OPAC, try the group search from the libraries pulldown menu Signed-off-by: Liz Rea <liz@catalyst.net.nz> Yes! Now this works, and well.
QA comment * small patch, good test plan * passes koha-qa.pl * work well, no side effect risk * an improvement could be to separate more clearly branches & groups in the list, because atm, you would get A BRANCH ANOTHER BRANCH BRANCH QUICK BRANCH A GROUP the "A GROUP" is not ordered alphabetically, not separated from branches. But that's not worth failing QA for that. It's just a suggestion for a follow-up
Created attachment 16745 [details] [review] [PASSED QA] Bug 9257 - Add "groups" to normal search pulldown This patch adds the ability to add groups to the library select pulldown on the opac, if it is enabled. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Go to Administration › Libraries and groups 4) Create a new group, or edit an existing one 5) Ensure the 'Show in search pulldown' checkbox is checked 6) Save the group 7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled 8) Load the OPAC, try the group search from the libraries pulldown menu Signed-off-by: Liz Rea <liz@catalyst.net.nz> Yes! Now this works, and well. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch has been pushed to master.