{% load i18n %}

<div class="pagination">

<ul class="pagination">
    
    <li>
        {% if page.has_previous %}
            <a href="?page={{ page.previous_page_number }}"
               class="load-maincontent">« {% trans "previous" %}</a>
        {% else %}
            <span class="deactivated">« {% trans "previous" %}</span>
        {% endif %}
    </li>
    
    {% for i in page_range %}
        {% if page.number != i %}
            <li>
            <a href="?page={{ i }}"
               class="load-maincontent">{{i}}</a>
           </li>
        {% else %}
            <li class="active">
            {{i}}
            </li>
        {% endif %}
    {% endfor %}
    
    <li>
        {% if page.has_next %}
        <a href="?page={{ page.next_page_number }}"
           class="load-maincontent">{%trans "next" %} »</a>
        {% else %}
            <span class="deactivated">{%trans "next" %} »</span>
        {% endif %}
    </li>
</ul>
</div>

