{% load i18n %}

{% if current_page.has_previous or current_page.has_next %}
<div class="pagination">
<ul>

<li class="disabled page-info">
    <a>{% trans "Page" %} {{ current_page.number }} {% trans "of" %} {{ current_page.paginator.num_pages }}</a>
</li>
<li class="prev previous{% if not current_page.has_previous %} disabled{% endif %}">
    <a{% if current_page.has_previous %} href="?{{ page_var }}={{ current_page.previous_page_number }}{% if querystring %}&{{ querystring }}{% endif %}"{% endif %}>&larr;</a>
</li>
{% for page in current_page.visible_page_range %}
<li{% if page == current_page.number %} class="active"{% endif %}>
    <a href="?{{ page_var }}={{ page }}{% if querystring %}&{{ querystring }}{% endif %}">{{ page }}</a>
</li>
{% endfor %}
<li class="next{% if not current_page.has_next %} disabled{% endif %}">
    <a{% if current_page.has_next %} href="?{{ page_var }}={{ current_page.next_page_number }}{% if querystring %}&{{ querystring }}{% endif %}"{% endif %}>&rarr;</a>
</li>

</ul>
</div>
{% endif %}
