You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.8 KiB
51 lines
1.8 KiB
{% if is_paginated %}
|
|
<nav>
|
|
<ul class="pagination">
|
|
<li>
|
|
<a
|
|
href="#"
|
|
aria-label="Previous"
|
|
|
|
{% if page_obj.has_previous %}
|
|
onclick="paginateTo({{ page_obj.previous_page_number }}); return false"
|
|
{% else %}
|
|
onclick="return false"
|
|
style="cursor: not-allowed"
|
|
{% endif %}>
|
|
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
|
</a>
|
|
</li>
|
|
|
|
{% for n in page_obj.paginator.page_range %}
|
|
{% if n == page_obj.number %}
|
|
<li class="active"><a href="#" onclick="return false">{{ n }}</a></li>
|
|
{% else %}
|
|
<li><a href="#" onclick="paginateTo({{ n }}); return false">{{ n }}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
<li>
|
|
<a
|
|
href="#"
|
|
aria-label="Next"
|
|
|
|
{% if page_obj.has_next %}
|
|
onclick="paginateTo({{ page_obj.next_page_number }}); return false"
|
|
{% else %}
|
|
onclick="return false"
|
|
style="cursor: not-allowed"
|
|
{% endif %}>
|
|
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<script>
|
|
function paginateTo(pageNum) {
|
|
var urlObj = new URI(location.href)
|
|
urlObj.setQuery('page', pageNum)
|
|
location.href = urlObj.href()
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
|