shimatta-kenkyusho/shimatta_kenkyusho/templates/paginator.html

25 lines
1.4 KiB
HTML
Raw Permalink 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}}{% if additional_params %}&{{additional_params}}{% endif %}">&laquo;</a></li>
2021-08-14 02:20:45 +02:00
{% 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}}{% if additional_params %}&{{additional_params}}{% endif %}">{{i}}</a></li>
2021-08-14 02:20:45 +02:00
{% else %}
<li class="page-item"><a class="page-link" href="?{{get_param}}={{i}}{% if additional_params %}&{{additional_params}}{% endif %}">{{i}}</a></li>
2021-08-14 02:20:45 +02:00
{% endif %}
{% endif %}
{% endfor %}
{% if paginator.has_next %}
<li class="page-item"><a class="page-link" href="?{{get_param}}={{paginator.next_page_number}}{% if additional_params %}&{{additional_params}}{% endif %}">&raquo;</a></li>
2021-08-14 02:20:45 +02:00
{% else %}
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
{% endif %}
</ul>
</nav>
{% endif %}