{% load i18n %} {# Reusable pagination controls for key detail collections #} {# Parameters: collection_type (for labeling), position (top/bottom) #}

{% if use_cursor_pagination %} {% if has_more or current_cursor > 0 %} {% if range_start and range_end %} {% if collection_type == "hash" %} Showing fields {{ range_start }} - {{ range_end }} of {{ key_data.size }} {% else %} Showing items {{ range_start }} - {{ range_end }} of {{ key_data.size }} {% endif %} {% else %} {% if collection_type == "hash" %} Showing {{ showing_count }} of {{ key_data.size }} fields (cursor: {{ current_cursor }}) {% else %} Showing {{ showing_count }} of {{ key_data.size }} items (cursor: {{ current_cursor }}) {% endif %} {% endif %}
{% if current_cursor > 0 %} {% endif %} {% if has_more %} {% endif %} {% else %} {% if collection_type == "hash" %} Showing all {{ key_data.size }} fields {% else %} Showing all {{ key_data.size }} items {% endif %} {% endif %} {% else %} {% if total_pages > 1 %} Page {{ current_page }} of {{ total_pages }} {% if collection_type == "hash" %} (showing {{ showing_count }} of {{ key_data.size }} fields) {% else %} (showing {{ showing_count }} of {{ key_data.size }} items) {% endif %}
{% if has_previous %} {% endif %} {% for num in page_range %} {% if num == "..." %} … {% elif num == current_page %} {{ num }} {% else %} {{ num }} {% endif %} {% endfor %} {% if has_next %} {% endif %} {% else %} {% if collection_type == "hash" %} Showing all {{ key_data.size }} fields {% else %} Showing all {{ key_data.size }} items {% endif %} {% endif %} {% endif %}