{% load i18n %} {# Reusable pagination controls for key detail collections #} {# Parameters: collection_type (for labeling) #}
{% if use_cursor_pagination %} {% if has_more or current_cursor > 0 %}
{% if range_start and range_end %} {% if collection_type == "hash" %} {% blocktrans with start=range_start end=range_end total=key_data.size %}Showing fields {{ start }} - {{ end }} of {{ total }}{% endblocktrans %} {% else %} {% blocktrans with start=range_start end=range_end total=key_data.size %}Showing items {{ start }} - {{ end }} of {{ total }}{% endblocktrans %} {% endif %} {% else %} {% if collection_type == "hash" %} {% blocktrans with count=showing_count total=key_data.size cursor=current_cursor %}Showing {{ count }} of {{ total }} fields (cursor: {{ cursor }}){% endblocktrans %} {% else %} {% blocktrans with count=showing_count total=key_data.size cursor=current_cursor %}Showing {{ count }} of {{ total }} items (cursor: {{ cursor }}){% endblocktrans %} {% endif %} {% endif %}
{% if current_cursor > 0 %} {% trans "First" %} {% else %} {% trans "First" %} {% endif %} {% if has_more %} {% trans "Next" %} {% else %} {% trans "Next" %} {% endif %}
{% else %}
{% if collection_type == "hash" %} {% blocktrans with total=key_data.size %}Showing all {{ total }} fields{% endblocktrans %} {% else %} {% blocktrans with total=key_data.size %}Showing all {{ total }} items{% endblocktrans %} {% endif %}
{% endif %} {% else %} {% if total_pages > 1 %}
{% if collection_type == "hash" %} {% blocktrans with page=current_page total_pages=total_pages count=showing_count total=key_data.size %}Page {{ page }} of {{ total_pages }} (showing {{ count }} of {{ total }} fields){% endblocktrans %} {% else %} {% blocktrans with page=current_page total_pages=total_pages count=showing_count total=key_data.size %}Page {{ page }} of {{ total_pages }} (showing {{ count }} of {{ total }} items){% endblocktrans %} {% endif %}
{% if has_previous %} {% trans "Previous" %} {% else %} {% trans "Previous" %} {% endif %} {% for num in page_range %} {% if num == "..." %} {% elif num == current_page %} {{ num }} {% else %} {{ num }} {% endif %} {% endfor %} {% if has_next %} {% trans "Next" %} {% else %} {% trans "Next" %} {% endif %}
{% else %}
{% if collection_type == "hash" %} {% blocktrans with total=key_data.size %}Showing all {{ total }} fields{% endblocktrans %} {% else %} {% blocktrans with total=key_data.size %}Showing all {{ total }} items{% endblocktrans %} {% endif %}
{% endif %} {% endif %}