]> git.koha-community.org Git - koha.git/commit
Bug 36742: Do not show library selection options if there is one or fewer public...
authorOwen Leonard <oleonard@myacpl.org>
Thu, 27 Jun 2024 19:15:11 +0000 (19:15 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 11 Oct 2024 10:21:33 +0000 (12:21 +0200)
commit99acd9c3fd353352dafb48a7aa728c24f5aefbc1
tree44c209dc7120c2ce367cbb3693a5e537cc882bdf
parent01ebb27b5ea598408bb5584124ad9ad77320db9b
Bug 36742: Do not show library selection options if there is one or fewer public libraries

If a system has only one library or only one library which is public we
don't need to show library-selection menus. It doesn't make sense to
show a dropdown with only one choice.

This patch updates instances of Branches.all to add a "public => 1"
parameter.

To test, apply the patch and start with a set of multiple public
libraries in your system (where public means the entry in Administration
-> Libraries for that library has the "Public" option set to "Yes").

Log in to the OPAC test these pages, in each case confirming that the
the library dropdown appears correctly.

- OPAC home page (with OpacAddMastheadLibraryPulldown enabled)
- OPAC news section (with existing news items and OpacNewsLibrarySelect
  enabled)
- Advanced search (Location and availability section)
- The "Most popular" page (with OpacTopissue enabled)
- The suggestion entry form (with suggestion enabled)
- The article request entry form (with ArticleRequests enabled and
  circulation rules configured to allow requests)

Test again with only one library or only one public library.
Test again with no public libraries.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt