add date sorting
[phinde.git] / data / templates / search / sidebar.htm
index eaddaeb9ad5fea76bb132aca0bc4c9fcccf45483..a48b6e805664d76d25da78a84428d3f85cd88a3a 100644 (file)
@@ -1,7 +1,25 @@
-<p>
- Filter results by:
+{% if hitcount > 1 %}
+ Sort by:
+<div class="btn-group">
+ <a class="btn{%if sort==""%} disabled btn-primary{%endif%}" href="{{urlSortRelevance}}">Relevance</a>
+ <a class="btn{%if sort=="date"%} disabled btn-primary{%endif%}" href="{{urlSortDate}}">Date</a>
+</div>
+<br/>
+<br/>
+{% endif %}
+{% 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}}.
 </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'} %}