{% load i18n tinyforum %}
{% if object_list.paginator %}
{% if object_list.has_previous %}
«
{% else %}
«
{% endif %}
{% for p in object_list.paginator.page_range %}
{% if forloop.first and not p == object_list.number %}
{{ p }}
{% elif forloop.last and not p == object_list.number %}
{{ p }}
{% elif p <= object_list.number|add:3 and p >= object_list.number|add:-3 %}
{% if p == object_list.number|add:-3 %}
…
{% endif %}
{% ifequal p object_list.number %}
{{ p }}
{% else %}
{{ p }}
{% endifequal %}
{% if p == object_list.number|add:3 %}
…
{% endif %}
{% endif %}
{% endfor %}
{% if object_list.has_next %}
»
{% else %}
»
{% endif %}