Fixes #1187: Fixed table pagination by introducing a custom table template

This commit is contained in:
Jeremy Stretch
2017-05-16 16:19:55 -04:00
parent 7ceb64b57b
commit 779446da64
42 changed files with 98 additions and 155 deletions

View File

@@ -0,0 +1,28 @@
{% load helpers %}
<div class="paginator pull-right">
{% if paginator.num_pages > 1 %}
<nav>
<ul class="pagination pull-right">
{% if page.has_previous %}
<li><a href="{% querystring request page=page.previous_page_number %}"><i class="fa fa-angle-double-left"></i></a></li>
{% endif %}
{% for p in page.smart_pages %}
{% if p %}
<li{% ifequal page.number p %} class="active"{% endifequal %}><a href="{% querystring request page=p %}">{{ p }}</a></li>
{% else %}
<li class="disabled"><span>&hellip;</span></li>
{% endif %}
{% endfor %}
{% if page.has_next %}
<li><a href="{% querystring request page=page.next_page_number %}"><i class="fa fa-angle-double-right"></i></a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% if page %}
<div class="text-right text-muted">
Showing {{ page.start_index }}-{{ page.end_index }} of {{ page.paginator.count }}
</div>
{% endif %}
</div>