diff options
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/paginator.html | 16 | ||||
-rw-r--r-- | hyperkitty/templates/search_results.html | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/hyperkitty/templates/paginator.html b/hyperkitty/templates/paginator.html index 358ae5d..0b4e0d7 100644 --- a/hyperkitty/templates/paginator.html +++ b/hyperkitty/templates/paginator.html @@ -1,8 +1,11 @@ {% load i18n %} -<ul class="pager"> +{% load hk_generic %} + +<div class="pagination pagination-centered"> +<ul> {% if pager.has_previous %} <li> - <a href="?{{ page_key|default:'page' }}={{ pager.previous_page_number }}"> + <a href="?{% add_to_query_string page_key|default:'page' pager.previous_page_number %}"> {% else %} <li class="disabled"> <a href="#"> @@ -10,9 +13,15 @@ ← Newer</a> </li> + {% for pagenum in pager.page_range %} + <li{% if pagenum == pager.number %} class="active"{% endif %}> + <a href="?{% add_to_query_string page_key|default:'page' pagenum %}">{{ pagenum }}</a> + </li> + {% endfor %} + {% if pager.has_next %} <li> - <a href="?{{ page_key|default:'page' }}={{ pager.next_page_number }}"> + <a href="?{% add_to_query_string page_key|default:'page' pager.next_page_number %}"> {% else %} <li class="disabled"> <a href="#"> @@ -20,5 +29,6 @@ Older →</a> </li> </ul> +</div> {# vim: set noet: #} diff --git a/hyperkitty/templates/search_results.html b/hyperkitty/templates/search_results.html index 41b97ba..c9cc754 100644 --- a/hyperkitty/templates/search_results.html +++ b/hyperkitty/templates/search_results.html @@ -56,7 +56,7 @@ Search results for "{{ query }}"{% if mlist %} - {{ mlist.display_name|default:m ← Previous</a> </li> - {% for pagenum in page_range %} + {% for pagenum in messages.page_range %} <li{% if pagenum == messages.number %} class="active"{% endif %}> <a href="?{% add_to_query_string page=pagenum %}">{{ pagenum }}</a> </li> |