src/cm/templates/site/macros/paginator.html
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 18:35:26 +0200
changeset 656 a84519031134
parent 159 4ec5ae89a7b0
permissions -rw-r--r--
add link to "privacy policy" in the header test

{% load com %}
{% load i18n %}
<span id="paginator" style="float:right;">
    {% if page_obj %}
        {% if page_obj.has_previous %}<a title="{% blocktrans %}Previous page{% endblocktrans %}" href="?{% newparams 'page' page_obj.previous_page_number %}">&laquo;</a>{% else %}&nbsp;{% endif %}
                {% blocktrans with page_obj.start_index as sindex and page_obj.end_index as eindex and paginator.count as pcount %}{{ sindex }}-{{ eindex }} of {{ pcount }}{% endblocktrans %} 
        {% if page_obj.has_next %}<a title="{% blocktrans %}Next page{% endblocktrans %}" href="?{% newparams 'page' page_obj.next_page_number %}">&raquo;</a>{% else %}&nbsp;{% endif %}

        {% if not_show_all %}{% else %}{% if page_obj.has_previous or page_obj.has_next %}(<a title="{% blocktrans %}View all{% endblocktrans %}" href="?{% newparams 'paginate' '0' %}">{% blocktrans %}all{% endblocktrans %}</a>){% endif %}{% endif %}
    {% else %}
    (<a title="{% blocktrans %}paginate{% endblocktrans %}" href="?{% newparams 'paginate' '' %}">{% blocktrans %}paginate{% endblocktrans %}</a>)
    {% endif %}
</span>