help text in sidebar
[phinde.git] / data / templates / search / sidebar.htm
index 619301e11fc354d2cfc5b3872b7707a74559b916..9247f36889d97ba42a0a6dab8114383160af3bfb 100644 (file)
@@ -1,48 +1,29 @@
-<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>
+{% if hitcount > 1 %}
+ Sort by:
+<div class="btn-group">
+ <a class="btn{%if sort=="score"%} disabled btn-primary{%endif%}" href="{{urlSorts.score}}">Relevance</a>
+ <a class="btn{%if sort=="date"%} disabled btn-primary{%endif%}" href="{{urlSorts.date}}">Date</a>
+</div>
+<br/>
+<br/>
 {% 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>
+{% 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 %}
 
-{% 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 %}
+<p class="muted">
+ Query took {{queryTime}}.
+</p>
 
-{% 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>
+{% if sidebarinclude %}
+  {% include sidebarinclude %}
 {% endif %}
-