mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% load django_tables2 %}
 | 
						|
 | 
						|
{# Custom pagination controls to render nicely with Bootstrap CSS. smart_pages requires EnhancedPaginator. #}
 | 
						|
 | 
						|
<div class="row">
 | 
						|
    <div class="col-md-7">
 | 
						|
    {% if table.paginator.num_pages > 1 %}
 | 
						|
        <nav>
 | 
						|
            <ul class="pagination">
 | 
						|
                {% if table.page.has_previous %}
 | 
						|
                    <li><a href="{% querystring table.prefixed_page_field=table.page.previous_page_number %}">«</a></li>
 | 
						|
                {% endif %}
 | 
						|
                {% for p in table.page.smart_pages %}
 | 
						|
                    {% if p %}
 | 
						|
                        <li{% ifequal table.page.number p %} class="active"{% endifequal %}><a href="{% querystring table.prefixed_page_field=p %}">{{ p }}</a></li>
 | 
						|
                    {% else %}
 | 
						|
                        <li class="disabled"><span>…</span></li>
 | 
						|
                    {% endif %}
 | 
						|
                {% endfor %}
 | 
						|
                {% if table.page.has_next %}
 | 
						|
                    <li><a href="{% querystring table.prefixed_page_field=table.page.next_page_number %}">»</a></li>
 | 
						|
                {% endif %}
 | 
						|
            </ul>
 | 
						|
        </nav>
 | 
						|
    {% endif %}
 | 
						|
    </div>
 | 
						|
    <div class="col-md-5 text-right text-muted">
 | 
						|
        Showing {{ table.page.start_index }}-{{ table.page.end_index }} of {{ total }}
 | 
						|
        {% if total == 1 %}
 | 
						|
            {{ table.data.verbose_name }}
 | 
						|
        {% else %}
 | 
						|
            {{ table.data.verbose_name_plural }}
 | 
						|
        {% endif %}
 | 
						|
    </div>
 | 
						|
</div> |