Bug 9257 - Add "groups" to normal search pulldown
Summary: Add "groups" to normal search pulldown
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Paul Poulain
URL:
Keywords:
: 9794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-10 18:57 UTC by Kyle M Hall (khall)
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
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 (16.43 KB, patch)
2012-12-10 19:01 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9257 - Add "groups" to normal search pulldown (16.43 KB, patch)
2013-01-02 16:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9257 - Add "groups" to normal search pulldown - Followup (7.99 KB, patch)
2013-01-02 16:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9257 - Add "groups" to normal search pulldown (17.11 KB, patch)
2013-02-12 18:55 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9257 - Add "groups" to normal search pulldown (17.11 KB, patch)
2013-03-12 19:12 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9257 - Add "groups" to normal search pulldown (17.19 KB, patch)
2013-03-12 21:44 UTC, Liz Rea
Details | Diff | Splinter Review
[PASSED QA] Bug 9257 - Add "groups" to normal search pulldown (17.28 KB, patch)
2013-03-22 10:03 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2012-12-10 18:57:54 UTC
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.
Comment 1 Kyle M Hall (khall) 2012-12-10 19:01:44 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-12-27 17:12:50 UTC
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?
Comment 3 Kyle M Hall (khall) 2013-01-02 16:37:31 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall (khall) 2013-01-02 16:37:40 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall (khall) 2013-01-02 16:39:04 UTC
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?
Comment 6 Owen Leonard 2013-01-29 21:20:43 UTC
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?
Comment 7 Kyle M Hall (khall) 2013-02-12 18:55:36 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall (khall) 2013-02-12 19:00:15 UTC
(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 ).
Comment 9 Jared Camins-Esakov 2013-03-11 16:40:12 UTC
*** Bug 9794 has been marked as a duplicate of this bug. ***
Comment 10 Liz Rea 2013-03-12 02:32:00 UTC
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.
Comment 11 Liz Rea 2013-03-12 03:03:34 UTC
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)
Comment 12 Kyle M Hall (khall) 2013-03-12 19:12:45 UTC Comment hidden (obsolete)
Comment 13 Liz Rea 2013-03-12 21:44:35 UTC Comment hidden (obsolete)
Comment 14 Paul Poulain 2013-03-22 10:02:30 UTC
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
Comment 15 Paul Poulain 2013-03-22 10:03:42 UTC
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>
Comment 16 Jared Camins-Esakov 2013-03-22 12:25:38 UTC
This patch has been pushed to master.