Bug 11489: (OPAC prog theme) show facets only if there is a result to display
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 9 Jan 2014 16:53:04 +0000 (17:53 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 13 Aug 2014 18:22:50 +0000 (14:22 -0400)
commitb30ee9546cf5ba6085ba04645e3f62a971c50544
tree0f454d98ca6bbd65079823a0cbca7bfdef559d16
parent0ab77a620bd3a539e47e09ff29e1e91ddc4864dd
Bug 11489: (OPAC prog theme) show facets only if there is a result to display

If all results are hidden, the facets are displayed.
With this patch, the facets are hidden too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Michot <nmichot@voila.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Tested:

- Record with 1 lost item, result list = 1
  - Verified without both patches 404 error page is shown
  - Verified with 1st patch, no results page is shown
  - Verified with 2nd patch, the still showing facets are gone
- Record with 1 lost item, result list > 1
  - Record is hidden from result list, but
    - result count is wrong
    - result numbering is wrong
    > This is an old problem, just noting
- Record with 1 lost and 1 available item, result list = 1
  - Detail page is shown, only lost item is hidden
- Record with 1 lost and 1 available item, result list > 1
  - Only available item is shown in result list

Also checked that the lost item shows up with hidelostitems off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 65fb03c0f439fdc8bef7ce0359afa75598c39147)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc