From 8a681b27fb1e2644a1330ed6e5581232ee1eb107 Mon Sep 17 00:00:00 2001 From: Aamir Khan Date: Sat, 11 Aug 2012 11:35:43 +0530 Subject: Issue 15: Add pagination next | prev in web interface --- hyperkitty/templates/month_view.html | 5 ++++- hyperkitty/templates/paginator.html | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 hyperkitty/templates/paginator.html (limited to 'hyperkitty/templates') diff --git a/hyperkitty/templates/month_view.html b/hyperkitty/templates/month_view.html index e8b42bc..96c8fc9 100644 --- a/hyperkitty/templates/month_view.html +++ b/hyperkitty/templates/month_view.html @@ -77,9 +77,12 @@ {% empty %} - Sorry no emails could be found for your search. + Sorry no emails could be found for your search. {% endfor %} + + {% include "paginator.html" %} +
{% for key, value in archives_length|sort %}

{{ key }}

diff --git a/hyperkitty/templates/paginator.html b/hyperkitty/templates/paginator.html new file mode 100644 index 0000000..170d8b4 --- /dev/null +++ b/hyperkitty/templates/paginator.html @@ -0,0 +1,27 @@ +{% load i18n %} +
+ {% if has_previous %} + + < Prev + + {% endif %} + + {% if show_first %} + 1 + ... + {% endif %} + {% for linkpage in page_numbers %} + {% ifequal linkpage page %} + {{ page }} + {% else %} + {{ linkpage }} + {% endifequal %} + {% endfor %} + {% if show_last %} + ... + {{ pages }} + {% endif %} + {% if has_next %} + Next > + {% endif %} +
-- cgit