From 1de186bb0fbe997a1595b0cdeac146f9a3647368 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 4 Feb 2016 17:23:14 +0100 Subject: do not show filter headline if there are none --- data/templates/search/sidebar.htm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'data') diff --git a/data/templates/search/sidebar.htm b/data/templates/search/sidebar.htm index 8665706..9e36312 100644 --- a/data/templates/search/sidebar.htm +++ b/data/templates/search/sidebar.htm @@ -1,10 +1,15 @@ -

- Filter results by: -

-{% include 'search/sidebar-filter.htm' with {'type': 'tags', 'title': 'Tag'} %} -{% include 'search/sidebar-filter.htm' with {'type': 'domain', 'title': 'Domain'} %} -{% include 'search/sidebar-filter.htm' with {'type': 'language', 'title': 'Language'} %} -{% include 'search/sidebar-filter.htm' with {'type': 'type', 'title': 'Type'} %} +{% set filters %} + {% include 'search/sidebar-filter.htm' with {'type': 'tags', 'title': 'Tag'} %} + {% include 'search/sidebar-filter.htm' with {'type': 'domain', 'title': 'Domain'} %} + {% include 'search/sidebar-filter.htm' with {'type': 'language', 'title': 'Language'} %} + {% include 'search/sidebar-filter.htm' with {'type': 'type', 'title': 'Type'} %} +{% endset %} +{% if filters|trim %} +

+ Filter results by: +

+ {{filters}} +{% endif %}

Query took {{queryTime}}. -- cgit v1.2.3