Bug 10354 - Don't show optgroup Libraries when no search groups are defined
Summary: Don't show optgroup Libraries when no search groups are defined
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-27 13:55 UTC by Katrin Fischer
Modified: 2014-12-07 20:02 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10354 - Don't show optgroup Libraries when no search groups are defined (2.27 KB, patch)
2013-05-31 14:12 UTC, Owen Leonard
Details | Diff | Splinter Review
[Signed-Off] Bug 10354 - Don't show optgroup Libraries when no search groups are defined (2.28 KB, patch)
2013-06-03 01:47 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 10354 - Don't show optgroup Libraries when no search groups are defined (2.34 KB, patch)
2013-06-07 12:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
[ALT] Bug 10354: Remove erroneous call to haspermission in basket.pl (1.14 KB, patch)
2013-06-07 12:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2013-05-27 13:55:48 UTC
When using OpacAddMastheadLibraryPulldown the library pull down next to the simple search now allways shows an opt group 'libraries' before the entries for the libraries. For an installation with only a few libraries and no search groups this doesn't make sense.

Also it would be good if the opt group heading could be formatted to make it more obvious that it's not an option that and can not be selected.
Comment 1 Owen Leonard 2013-05-31 14:12:04 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-06-03 01:47:06 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-06-07 12:26:58 UTC
QA comment:
Simple patch. Works as described.
Marked as Passed QA.
Comment 4 Jonathan Druart 2013-06-07 12:27:10 UTC
Created attachment 18732 [details] [review]
Bug 10354 - Don't show optgroup Libraries when no search groups are defined

In the OPAC, if there are no search groups defined, there's no reason to
embed library choices inside an <optgroup>. <optgroup> should only be
used to differentiate the list of individual libraries from search
groups. This patch removes the <optgroup> when no search groups are
enabled.

To test, apply the patch and:

- Enable OpacAddMastheadLibraryPulldown.
- Create a library search group in Administration ->
  Libraries and Groups and enable it by checking the "show in search
  pulldown" box.
- View the library pulldown in the OPAC search bar. Libraries and groups
  should be separated into <optgroup>s.
- Disable your library search group and refresh the OPAC page. The
  pulldown of libraries should now display libraries with no <optgroup>.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jonathan Druart 2013-06-07 12:37:09 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-06-07 12:38:02 UTC
Comment on attachment 18735 [details] [review]
[ALT] Bug 10354: Remove erroneous call to haspermission in basket.pl

Wrong report.
Comment 7 Galen Charlton 2013-06-07 15:46:28 UTC
Pushed to master.  Thanks, Owen!
Comment 8 Tomás Cohen Arazi 2013-06-10 18:02:37 UTC
This patch has been pushed to 3.12.x, will be in 3.12.1.

Thanks Owen!