8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-25 22:22:26 +00:00
re2o/templates/pagination.html
Dalahro 4bb831f18d Modification du paginateur
Factorisation du machin
2016-10-07 23:40:44 +02:00

17 lines
679 B
HTML

<ul class="pagination nav navbar-nav">
{% if list.has_previous %}
<li><a href="?page=1"> << </a></li>
<li><a href="?page={{ list.previous_page_number }}"> < </a></li>
{% endif %}
{% for page in list.paginator.page_range %}
{% if list.number <= page|add:"3" and list.number >= page|add:"-3" %}
<li class="{% if list.number == page %}active{% endif %}"><a href="?page={{page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if list.has_next %}
<li><a href="?page={{ list.next_page_number }}"> > </a></li>
<li><a href="?page={{ list.paginator.page_range|length }}"> >> </a></li>
{% endif %}
</ul>