{# Flask partial: query results table + pagination bar #}
{% if not success %}
{{ error }}
{% elif not results and not (pagination and pagination.total_count) %}

No results returned

{% else %} {% for col in columns %} {% endfor %} {% for row in results %} {% for col in columns %} {% endfor %} {% endfor %}
{{ col }}
{{ row[col] if row[col] is not none else '' }}
{% endif %}
0) %} style="display: none;" {% else %} style="display: block;" {% endif %}> {% if pagination and pagination.total_count > 0 %} {% if pagination.total_pages > 1 %} {% set start = (pagination.page - 1) * pagination.per_page + 1 %} {% set end = [pagination.page * pagination.per_page, pagination.total_count] | min %}
{{ start }}–{{ end }} of {{ pagination.total_count }} {% if pagination.page > 1 %} {% endif %} {% for i in page_numbers %} {% if loop.index > 1 and i > page_numbers[loop.index - 2] + 1 %} {% endif %} {% endfor %} {% if pagination.page < pagination.total_pages %} {% endif %}
{% else %} Page 1 of 1 ({{ pagination.total_count }} row{{ 's' if pagination.total_count != 1 else '' }}) {% endif %} {% endif %}