[Koha-bugs] [Bug 9801] location facet shows even if no locations

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 12 19:30:26 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9801

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19255|0                           |1
        is obsolete|                            |
  Attachment #19462|0                           |1
        is obsolete|                            |

--- Comment #5 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 19610
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19610&action=edit
Bug 9801 - location facet shows even if no locations

Currently, the headings for facets (such as location) are showing even
if there are no actual values/links for that facet type.

This patch simply checks if the facet array contains any facets before
printing the heading and HTML for each facet value/link.

Test Plan:

Before applying:

0) If you want to check the location facet (which is easiest),
enable singlebranch  mode in the globals system preferences.

1) Do a search for records/items that you have no shelving location
specified (or simply remove the shelving location for a small range
of records that you can find in a search query).

2) Note that "Location" appears amongst the facets even though there
are no values/links present. (If you look at the HTML source, you'll
see some empty HTML tags have been printed out.)

Apply patch.

3) Flush your cache and refresh your page.
4) You should no longer see a "Location" facet (or those empty HTML
tags) on the facet sidebar.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Template changes only.
Checked according to test plan, made sure location facet
still shows up when values exist, otherwise it's hidden.

It might make sense to add ids to the facets so libraries
can decide to hide some of them easily. Or alternatively
add a system preference to make that possible.

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list