diff options
author | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-08-11 11:35:43 +0530 |
---|---|---|
committer | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-08-11 11:35:43 +0530 |
commit | 8a681b27fb1e2644a1330ed6e5581232ee1eb107 (patch) | |
tree | 961237b5309d10e6fb652481a91c03894c3fdcdb /hyperkitty/templates | |
parent | 276b6ec8e34695bb7ddb0a2bf5ea6470b355b499 (diff) | |
download | hyperkitty-8a681b27fb1e2644a1330ed6e5581232ee1eb107.tar.gz hyperkitty-8a681b27fb1e2644a1330ed6e5581232ee1eb107.tar.xz hyperkitty-8a681b27fb1e2644a1330ed6e5581232ee1eb107.zip |
Issue 15: Add pagination next | prev in web interface
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/month_view.html | 5 | ||||
-rw-r--r-- | hyperkitty/templates/paginator.html | 27 |
2 files changed, 31 insertions, 1 deletions
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 @@ </div> <!-- End of thread --> {% empty %} - Sorry no emails could be found for your search. + Sorry no emails could be found for your search. {% endfor %} + + {% include "paginator.html" %} </div> + <div id="archives"> {% for key, value in archives_length|sort %} <h3>{{ key }}</h3> 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 %} +<div class="pager"> + {% if has_previous %} + <span class="page"> + <a href="?page={{ previous }}">< Prev</a> + </span> + {% endif %} + + {% if show_first %} + <span class="page"><a href="?page=1">1</a></span> + <span class="ellipsis">...</span> + {% endif %} + {% for linkpage in page_numbers %} + {% ifequal linkpage page %} + <span class="current">{{ page }}</span> + {% else %} + <span class="page"><a href="?page={{ linkpage }}">{{ linkpage }}</a></span> + {% endifequal %} + {% endfor %} + {% if show_last %} + <span class="ellipsis">...</span> + <span class="page"><a href="?page=last">{{ pages }}</a></span> + {% endif %} + {% if has_next %} + <span class="page"><a href="?page={{ next }}">Next ></a></span> + {% endif %} +</div> |