diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2011-12-05 22:38:43 -0500 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2011-12-05 22:38:43 -0500 |
commit | 803d20968fea1e25a298aa3b4e670d5670995e0d (patch) | |
tree | 2f90c6b8403e85576d0109a672dccb46598ce115 /templates/_pagination.html | |
download | stackbin-803d20968fea1e25a298aa3b4e670d5670995e0d.tar.gz stackbin-803d20968fea1e25a298aa3b4e670d5670995e0d.tar.bz2 stackbin-803d20968fea1e25a298aa3b4e670d5670995e0d.zip |
Added as example app
Diffstat (limited to 'templates/_pagination.html')
-rw-r--r-- | templates/_pagination.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/_pagination.html b/templates/_pagination.html new file mode 100644 index 0000000..cb0d13e --- /dev/null +++ b/templates/_pagination.html @@ -0,0 +1,19 @@ +{% macro render_pagination(pagination) %} + <div class=pagination> + {%- for page in pagination.iter_pages() %} + {% if page %} + {% if page != pagination.page %} + <a href="{{ url_for_other_page(page) }}">{{ page }}</a> + {% else %} + <strong>{{ page }}</strong> + {% endif %} + {% else %} + <span class=ellipsis>…</span> + {% endif %} + {%- endfor %} + {% if pagination.has_next %} + <a href="{{ url_for_other_page(pagination.page + 1) + }}">Next »</a> + {% endif %} + </div> +{% endmacro %} |