From 80dbd3e894d44b19ef1b9cb4e3646da0318ed2cb Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 31 Aug 2022 10:03:31 +0000 Subject: [PATCH] Bug 31668: Avoid displaying nothing in facet This patch displays 'No information provided' if a facet value/description cannot be found, rather than displaying an empty/hidden facet Test plan: 1) Do a search, like 'a' 2) Look in the bottom of the sidebar on the left and see that there is an empty language 3) Apply patch 4) Update database 5) Do the same research 6) See that there is now "No information provided" Signed-off-by: Alexis Ripetti --- koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index c4c854cadb..bc7676c5f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -61,11 +61,11 @@ [% END %] [% IF facet.active %] [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] - [% facet.facet_label_value | html %] + [% IF (facet.facet_label_value) %][% facet.facet_label_value | html %][% ELSE %]No information provided[% END %] [x] [% ELSE %] [% local_url = BLOCK %][% url | $raw %][% "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] - [% facet.facet_label_value | html %] + [% IF (facet.facet_label_value) %][% facet.facet_label_value | html %][% ELSE %]No information provided[% END %] [% IF ( displayFacetCount ) %] ([% facet.facet_count | html %]) [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index af51f0b605..ee319066ce 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -69,14 +69,14 @@ [% END %] [% IF facet.active %] [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] - [% facet.facet_label_value | html %] + [% IF (facet.facet_label_value) %][% facet.facet_label_value | html %][% ELSE %]No information provided[% END %] [% IF ( displayFacetCount ) %] ([% facet.facet_count | html %]) [% END %] [x] [% ELSE %] [% local_url = BLOCK %][% url | $raw %][% "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] - [% facet.facet_label_value | html %] + [% IF (facet.facet_label_value) %][% facet.facet_label_value | html %][% ELSE %]No information provided[% END %] [% IF ( displayFacetCount ) %] ([% facet.facet_count | html %]) [% END %] -- 2.30.2