]> git.koha-community.org Git - koha.git/commit
Bug 10354 - Don't show optgroup Libraries when no search groups are defined
authorOwen Leonard <oleonard@myacpl.org>
Fri, 31 May 2013 13:54:34 +0000 (09:54 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 10 Jun 2013 17:58:19 +0000 (14:58 -0300)
commitfd7b1a95120313316d987d353e7787bb4371bed8
tree24304e4722b8365ecccaed37c19f772a2b764243
parent68a893fe11cc6fa8e8a2a372180a3fd2ad722d18
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>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 545ed7a0b6f7cffc7a5cc904963b7bdcf75038fc)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc