24 lines
697 B
HTML
24 lines
697 B
HTML
{% macro render_pagination(pagination) %}
|
|
<div class="pagination">
|
|
{% if pagination.has_prev %}
|
|
<a href="{{ pagination.prev|url }}">« Previous</a>
|
|
{% else %}
|
|
<span class="disabled">« Previous</span>
|
|
{% endif %} |
|
|
|
|
|
|
{% for page in range(1, pagination.pages + 1) %}
|
|
{% if page != pagination.page %}
|
|
<a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> |
|
|
{% else %}
|
|
{{ pagination.page }} |
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if pagination.has_next %}
|
|
<a href="{{ pagination.next|url }}">Next »</a>
|
|
{% else %}
|
|
<span class="disabled">Next »</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|