{% spaceless %}
	{% load django_tables2 %}
	<nav>
  		<ul class="pagination">
  			{% if has_previous %}<li><a href="{% querystring page_field=previous %}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>{% endif %}
  			{% if not in_leading_range %}
    			{% for p in pages_outside_trailing_range %}
      				<li><a href="{% querystring page_field=p %}">{{ p }}</a></li>
    			{% endfor %}
    			<li class="disabled"><span aria-hidden="true">...</span></li>
  			{% endif %}
  			{% for p in page_range %}
  				<li{% if p == page %} class="active"{% endif %}><a href="{% querystring page_field=p %}">{{ p }}{% if p == page %} <span class="sr-only">(current)</span>{% endif %}</a></li>
  			{% endfor %}
  			{% if not in_trailing_range %}
    			<li class="disabled"><span aria-hidden="true">...</span></li>
    			{% for p in pages_outside_leading_range reversed %}
      				<li><a href="{% querystring page_field=p %}">{{ p }}</a></li>
    			{% endfor %}
  			{% endif %}
  			{% if has_next %}<li><a href="{% querystring page_field=next %}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>{% endif %}
  		</ul>
  	</nav>
{% endspaceless %}
