From 94b7d8104198a2a331c7598039e59e55e554d29f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 31 Aug 2022 10:03:31 +0000 Subject: [PATCH] Bug 27136: 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 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 d31ade3d23..ce20e77a3a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -43,11 +43,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 5e6e638c0b..dbac676048 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -52,14 +52,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