Summary: | Add "groups" to normal search pulldown | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | OPAC | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | CLOSED FIXED | QA Contact: | Paul Poulain <paul.poulain> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | liz, nengard, paul.poulain |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 9257 - Add "groups" to normal search pulldown
Bug 9257 - Add "groups" to normal search pulldown Bug 9257 - Add "groups" to normal search pulldown - Followup Bug 9257 - Add "groups" to normal search pulldown Bug 9257 - Add "groups" to normal search pulldown Bug 9257 - Add "groups" to normal search pulldown [PASSED QA] Bug 9257 - Add "groups" to normal search pulldown |
Description
Kyle M Hall (khall)
2012-12-10 18:57:54 UTC
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. |