diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2016-02-04 17:23:14 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2016-02-04 17:23:14 +0100 |
| commit | 1de186bb0fbe997a1595b0cdeac146f9a3647368 (patch) | |
| tree | a8e787c38117dec15abb20c5346e074f125665f5 | |
| parent | 9728ce82bfda5cada1fb19a921dbf6c34b76d8d6 (diff) | |
| download | phinde-1de186bb0fbe997a1595b0cdeac146f9a3647368.tar.gz phinde-1de186bb0fbe997a1595b0cdeac146f9a3647368.zip | |
do not show filter headline if there are none
| -rw-r--r-- | data/templates/search/sidebar.htm | 19 |
1 files changed, 12 insertions, 7 deletions
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 @@ -<p> - Filter results by: -</p> -{% 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 %} + <p> + Filter results by: + </p> + {{filters}} +{% endif %} <p class="muted"> Query took {{queryTime}}. |
