NDOJ/templates/list-pages.html

32 lines
1.1 KiB
HTML
Raw Permalink Normal View History

2020-01-21 06:35:58 +00:00
<ul class="pagination">
2023-01-27 23:11:10 +00:00
{% if page_obj.has_previous() %}
{% if page_obj.previous_page_number() == 1 and first_page_href != None %}
<li><a href="{{ first_page_href }}">«</a></li>
2020-01-21 06:35:58 +00:00
{% else %}
2023-01-27 23:11:10 +00:00
<li><a href="{{ page_prefix or '' }}{{ page_obj.previous_page_number() }}{{ page_suffix or '' }}">«</a></li>
2020-01-21 06:35:58 +00:00
{% endif %}
2023-01-27 23:11:10 +00:00
{% else %}
<li class="disabled-page"><span>«</span></li>
{% endif %}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
{% for page in page_obj.page_range %}
{% if not page %}
<li class="disabled-page"><span>...</span></li>
2020-01-21 06:35:58 +00:00
{% else %}
2023-01-27 23:11:10 +00:00
<li{% if page == page_obj.number %} class="active-page"{% endif %}><a href="
{%- if page == 1 and first_page_href != None -%}
{{ first_page_href }}
{%- else -%}
{{ page_prefix or '' }}{{ page }}{{ page_suffix or '' }}
{%- endif -%}
">{{ page }}</a></li>
2020-01-21 06:35:58 +00:00
{% endif %}
2023-01-27 23:11:10 +00:00
{% endfor %}
{% if page_obj.has_next() %}
<li><a href="{{ page_prefix or '' }}{{ page_obj.next_page_number() }}{{ page_suffix or '' }}">»</a></li>
{% else %}
<li class="disabled-page"><span>»</span></li>
{% endif %}
2020-01-21 06:35:58 +00:00
</ul>