aboutsummaryrefslogtreecommitdiff
path: root/data/templates/search/sidebar.htm
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-02-03 17:23:06 +0100
committerChristian Weiske <cweiske@cweiske.de>2016-02-03 17:23:06 +0100
commite5c7780adb59e8038a040a1e534a4cee1fac8cd8 (patch)
tree2f8be5ac975398a7cb1084dd13c9350514119d85 /data/templates/search/sidebar.htm
parent226508cd8d3e8c147ad314a0de483e08be71c254 (diff)
downloadphinde-e5c7780adb59e8038a040a1e534a4cee1fac8cd8.tar.gz
phinde-e5c7780adb59e8038a040a1e534a4cee1fac8cd8.zip
filtering works
Diffstat (limited to 'data/templates/search/sidebar.htm')
-rw-r--r--data/templates/search/sidebar.htm49
1 files changed, 4 insertions, 45 deletions
diff --git a/data/templates/search/sidebar.htm b/data/templates/search/sidebar.htm
index 619301e..eaddaeb 100644
--- a/data/templates/search/sidebar.htm
+++ b/data/templates/search/sidebar.htm
@@ -1,48 +1,7 @@
<p>
Filter results by:
</p>
-{% if aggregations.tags.buckets|length > 1 %}
-<b>Tag</b>
-<ul class="nav nav-pills">
-{% for bucket in aggregations.tags.buckets|slice(0, 10) %}
- <li>
- <a href="{{bucket.url}}">{{bucket.key}} ({{bucket.doc_count}})</a>
- </li>
-{% endfor %}
-</ul>
-{% endif %}
-
-{% if aggregations.domain.buckets|length > 1 %}
-<!-- FIXME: negate domain -->
-<b>Domain</b>
-<ul class="nav nav-pills">
-{% for bucket in aggregations.domain.buckets|slice(0, 10) %}
- <li>
- <a href="{{bucket.url}}">{{bucket.key}} ({{bucket.doc_count}})</a>
- </li>
-{% endfor %}
-</ul>
-{% endif %}
-
-{% if aggregations.language.buckets|length > 1 %}
-<b>Language</b>
-<ul class="nav nav-pills">
-{% for bucket in aggregations.language.buckets|slice(0, 10) %}
- <li>
- <a href="{{bucket.url}}">{{bucket.key}} ({{bucket.doc_count}})</a>
- </li>
-{% endfor %}
-</ul>
-{% endif %}
-
-{% if aggregations.type.buckets|length > 1 %}
-<b>Type</b>
-<ul class="nav nav-pills">
-{% for bucket in aggregations.type.buckets|slice(0, 10) %}
- <li>
- <a href="{{bucket.url}}">{{bucket.key}} ({{bucket.doc_count}})</a>
- </li>
-{% endfor %}
-</ul>
-{% endif %}
-
+{% 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'} %}