Skip to content
This repository was archived by the owner on Apr 17, 2021. It is now read-only.

Commit 2998ec6

Browse files
adding show_index_range option
template options to show_index_range
1 parent c6c3a4c commit 2998ec6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bootstrap_pagination/templates/bootstrap_pagination/pagination.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<a title="Previous Page" href="{{ previous_page_url|default:"#" }}">{{ previous_label }}</a>
1111
</li>
1212
{% endif %}
13-
{% for pagenum, url in page_urls %}
13+
{% for pagenum, index_range, url in page_urls %}
1414
{% if page.number == pagenum %}
1515
<li class="active">
16-
<a title="Current Page" href="#">{{ pagenum }}</a>
16+
<a title="Current Page" href="#">{% if show_index_range %} {{ index_range }} {% else %} {{ pagenum }} {%endif %}</a>
1717
</li>
1818
{% else %}
1919
<li>
20-
<a title="Page {{ pagenum }} of {{ page.paginator.num_pages }}" href="{{ url }}">{{ pagenum }}</a>
20+
<a title="Page {{ pagenum }} of {{ page.paginator.num_pages }}" href="{{ url }}">{% if show_index_range %} {{ index_range }} {% else %} {{ pagenum }} {%endif %}</a>
2121
</li>
2222
{% endif %}
2323
{% endfor %}
@@ -31,4 +31,4 @@
3131
<a title="Last Page" href="{{ last_page_url|default:"#" }}">{{last_label}}</a>
3232
</li>
3333
{% endif %}
34-
</ul>
34+
</ul>

0 commit comments

Comments
 (0)