forked from rc/aircox
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.5 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=1">« {% translate "first" %}</a>
 | 
						|
        <a href="?{{ GET }}&page={{ page_obj.previous_page_number }}" class="left"
 | 
						|
            title="{% translate "previous" %}"
 | 
						|
            aria-label="{% translate "previous" %}">
 | 
						|
            {% translate "previous" %}
 | 
						|
        </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" %}">
 | 
						|
            {% translate "next" %}
 | 
						|
        </a>
 | 
						|
        <a href="?{{ GET }}&page={{ page_obj.paginator.num_pages }}" class="right"
 | 
						|
                title="{% translate "last" %}"
 | 
						|
                aria-label="{% translate "last" %}">
 | 
						|
            {% translate "last" %} »
 | 
						|
        </a>
 | 
						|
        {% endif %}
 | 
						|
    </ul>
 | 
						|
 | 
						|
</nav>
 | 
						|
{% endwith %}
 | 
						|
{% endif %}
 |