{% spaceless %}
{% load i18n %}

<p class="paginator">
    {% if has_previous %}
        <span class="prev"><a href="{{ previous_url }}" title="{% trans "previous" %}">&laquo; {% trans "previous" %}</a></span>
    {% endif %}
    {% for range in page_numbers %}
        {% if range %}
            {% for num, url in range %}
                {% ifequal num current %}
                    <span class="curr this_page">{{ num }}</span>
                {% else %}
                     <a class="page" href="{{ url }}" >{{ num }}</a>
                {% endifequal %}
            {% endfor %}
        {% else %}
          ...
        {% endif %}
    {% endfor %}
    {% if has_next %}
        <span class="next"><a href="{{ next_url }}" title="{% trans "next page" %}">{% trans "next" %} &raquo;</a></span>
    {% endif %}
</p>
{% endspaceless %}