<div class="pagination">
    <ul>
        {% if not objects.number == 1 %}
            <li><a href="{{ request.path }}?{{filter_query.urlencode}}&page=1">&laquo;</a></li>
        {% else %}
            <li class="disabled"><span>&laquo;</span></li>
        {% endif %}

        {% if objects.has_previous %}
            <li><a href="{{ request.path }}?{{filter_query.urlencode}}&page={{ objects.previous_page_number }}">{{ objects.previous_page_number }}</a></li>
        {% else %}
            <li class="disabled"><span>&lt;</span></li>
        {% endif %}

        <li class="active"><span>{{ objects.number }}</span></li>

        {% if objects.has_next %}
            <li><a href="{{ request.path }}?{{filter_query.urlencode}}&page={{ objects.next_page_number }}">{{ objects.next_page_number }}</a></li>
        {% else %}
            <li class="disabled"><span>&gt;</span></li>
        {% endif %}

        {% if not objects.number == objects.paginator.num_pages %}
            <li><a href="{{ request.path }}?{{filter_query.urlencode}}&page={{ objects.paginator.num_pages }}">&raquo;</a></li>
        {% else %}
            <li class="disabled"><span>&raquo;</span></li>
        {% endif %}

    </ul>
</div>
