forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
{% comment %}
|
|
Context:
|
|
- is_paginated: if True, page is paginated
|
|
- page_obj: page object from list view;
|
|
{% endcomment %}
|
|
{% load i18n aircox %}
|
|
|
|
{% if is_paginated %}
|
|
<hr/>
|
|
{% update_query request.GET.copy page=None as GET %}
|
|
{% with GET.urlencode as GET %}
|
|
<nav class="nav-urls is-centered" role="pagination" aria-label="{% translate "pagination" %}">
|
|
<ul class="urls">
|
|
{% if page_obj.has_previous %}
|
|
{% comment %}Translators: Bottom of the list, "previous page"{% endcomment %}
|
|
<a href="?{{ GET }}&page={{ page_obj.previous_page_number }}" class="left"
|
|
title="{% translate "Previous" %}"
|
|
aria-label="{% translate "Previous" %}">
|
|
<span class="icon"><i class="fa fa-chevron-left"></i></span>
|
|
</a>
|
|
{% endif %}
|
|
|
|
<span>
|
|
{{ page_obj.number }} / {{ page_obj.paginator.num_pages }}
|
|
</span>
|
|
|
|
{% if page_obj.has_next %}
|
|
{% comment %}Translators: Bottom of the list, "Nextpage"{% endcomment %}
|
|
<a href="?{{ GET }}&page={{ page_obj.next_page_number }}" class="right"
|
|
title="{% translate "Next" %}"
|
|
aria-label="{% translate "Next" %}">
|
|
<span class="icon"><i class="fa fa-chevron-right"></i></span>
|
|
</a>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
</nav>
|
|
{% endwith %}
|
|
{% endif %}
|