{% if is_paginated %}
{% load i18n %}
<div class="text-right">
  <ul class="pagination">
    {% if page_obj.has_previous %}
        <li><a href="?page={{ page_obj.previous_page_number }}{{ getvars }}{{ hashtag }}" class="prev">&lsaquo;&lsaquo; {% trans "previous" %}</a>
    {% else %}
        <li class="disabled"><span class="disabled prev">&lsaquo;&lsaquo; {% trans "previous" %}</span></li>
    {% endif %}
    {% for page in pages %}
        {% if page %}
            {% ifequal page page_obj.number %}
                <li class="active"><span class="current page">{{ page }}</span></li>
            {% else %}
                <li><a href="?page={{ page }}{{ getvars }}{{ hashtag }}" class="page">{{ page }}</a></li>
            {% endifequal %}
        {% else %}
        <li class="disabled"><span>...</span></li>
        {% endif %}
    {% endfor %}
    {% if page_obj.has_next %}
        <li><a href="?page={{ page_obj.next_page_number }}{{ getvars }}{{ hashtag }}" class="next">{% trans "next" %} &rsaquo;&rsaquo;</a></li>
    {% else %}
        <li class="disabled"><span class="disabled next">{% trans "next" %} &rsaquo;&rsaquo;</span></li>
    {% endif %}
  </ul>
</div>
{% endif %}
