diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-06-11 15:40:30 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-06-11 15:40:30 +0200 |
commit | e5c785c29f2af0f9978814f7a34132388c44045d (patch) | |
tree | 91ad8cf32fcdc83eaf508e518e354bc50f6143ce /hyperkitty/templates | |
parent | e9b09b0669e2d782331e287eba6450a383e267cb (diff) | |
download | hyperkitty-e5c785c29f2af0f9978814f7a34132388c44045d.tar.gz hyperkitty-e5c785c29f2af0f9978814f7a34132388c44045d.tar.xz hyperkitty-e5c785c29f2af0f9978814f7a34132388c44045d.zip |
Add a select box to change the search results ordering
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/search_results.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/hyperkitty/templates/search_results.html b/hyperkitty/templates/search_results.html index f91d664..f86280a 100644 --- a/hyperkitty/templates/search_results.html +++ b/hyperkitty/templates/search_results.html @@ -36,8 +36,31 @@ Search results for "{{ query }}"{% if mlist %} - {{ mlist.display_name|default:m {{ total }} messages </li> </ul> + + <form method="get" action="{% url 'search' %}" class="form-inline"> + <input type="hidden" name="query" value="{{ query|escape }}" /> + <input type="hidden" name="page" value="{{ messages.number }}" /> + {% if mlist %}<input type="hidden" name="list" value="{{ mlist.name }}" />{% endif %} + <p> + Sort mode: + <select name="sort"> + <option value="score" + {% if sort_mode == "score" %}selected{% endif %} + >score</option> + <option value="date-desc" + {% if sort_mode == "date-desc" %}selected{% endif %} + >latest first</option> + <option value="date-asc" + {% if sort_mode == "date-asc" %}selected{% endif %} + >earliest first</option> + </select> + <button type="submit" class="btn btn-small">Update</button> + </p> + </form> + </div> + {% for message in messages %} {% include "messages/summary_message.html" %} {% empty %} |