shimatta-kenkyusho/shimatta_kenkyusho/templates/paginator.html

25 lines
1.2 KiB
HTML
Raw Normal View History

2021-08-14 02:20:45 +02:00
{% if paginator.has_other_pages %}
<nav aria-label="{{aria_label}}">
<ul class="pagination">
{% if paginator.has_previous %}
<li class="page-item"><a class="page-link" href="?{{get_param}}={{paginator.previous_page_number}}">&laquo;</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link">&laquo;</span></li>
{% endif %}
{% for i in paginator.paginator.page_range %}
{% if i <= paginator.number|add:5 and i >= paginator.number|add:-5 %}
{% if i == paginator.number %}
<li class="page-item active"><a class="page-link" href="?{{get_param}}={{i}}">{{i}}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?{{get_param}}={{i}}">{{i}}</a></li>
{% endif %}
{% endif %}
{% endfor %}
{% if paginator.has_next %}
<li class="page-item"><a class="page-link" href="?{{get_param}}={{paginator.next_page_number}}">&raquo;</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
{% endif %}
</ul>
</nav>
{% endif %}