Mercurial > public > sg101
diff gpp/templates/forums/pagination.html @ 93:4c33e266db03
Forums: paginate the topic list inside a forum.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 13 Sep 2009 04:33:15 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/templates/forums/pagination.html Sun Sep 13 04:33:15 2009 +0000 @@ -0,0 +1,24 @@ +<div class="forums-post-navigation"> +{% ifequal page.paginator.num_pages 1 %} +Page 1 of 1 +{% else %} +Goto Page: +{% if page.has_previous %} +<a href="./?page={{ page.previous_page_number }}">Previous</a> +{% endif %} +{% for num in page.page_range %} +{% if num %} +{% ifequal num page.number %} +{{ num }} +{% else %} +<a href="./?page={{ num }}">{{ num }}</a> +{% endifequal %} +{% else %} +… +{% endif %} +{% endfor %} +{% if page.has_next %} +<a href="./?page={{ page.next_page_number }}">Next</a> +{% endif %} +{% endifequal %} +</div>