Bugzilla – Attachment 19610 Details for
Bug 9801
location facet shows even if no locations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9801 - location facet shows even if no locations
Bug-9801---location-facet-shows-even-if-no-locatio.patch (text/plain), 2.92 KB, created by
Kyle M Hall (khall)
on 2013-07-12 17:30:26 UTC
(
hide
)
Description:
Bug 9801 - location facet shows even if no locations
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-07-12 17:30:26 UTC
Size:
2.92 KB
patch
obsolete
>From d9323ccfa0f2e9654a7256c6fe78a27f8ef5c8be Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 27 Jun 2013 16:02:08 +1000 >Subject: [PATCH] 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@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@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/facets.inc | 2 ++ > .../opac-tmpl/prog/en/includes/opac-facets.inc | 2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >index fd2302a..8853ec7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >@@ -8,6 +8,7 @@ > </li> > > [% FOREACH facets_loo IN facets_loop %] >+[% IF facets_loo.facets.size > 0 %] > <li id="[% facets_loo.type_id %]"> > [% facets_loo.type_label %] > [% IF ( facets_loo.type_label_Authors ) %]Authors[% END %] >@@ -24,6 +25,7 @@ > [% END %] > </ul></li> > [% END %] >+[% END %] > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >index fbb7c55..5486b0c 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >@@ -8,6 +8,7 @@ > </li> > > [% FOREACH facets_loo IN facets_loop %] >+[% IF facets_loo.facets.size > 0 %] > <li id="[% facets_loo.type_id %]"> > [% IF ( facets_loo.type_label_Authors ) %]Authors[% END %] > [% IF ( facets_loo.type_label_Titles ) %]Titles[% END %] >@@ -25,6 +26,7 @@ > [% END %] > </ul></li> > [% END %] >+[% END %] > </ul> > </div> > [% IF ( OPACResultsSidebar ) %] >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9801
:
16068
|
19255
|
19462
| 19610