{# Jinja macros for reusable table patterns. #} {% macro results_summary(start_index, end_index, total) -%} {% if total and total > 0 %} Showing {{ start_index }}–{{ end_index }} of {{ total }} {% else %} No results {% endif %} {%- endmacro %} {% macro answer_table(headers, form_action=None, select_name='selected_ids', enable_bulk=False) -%}
{% if enable_bulk %} {% endif %} {% for h in headers %} {{ h.title }} {% endfor %} {{ caller() }}
{%- endmacro %} {% macro bulk_actions_bar() -%}
{{ caller() }}
{%- endmacro %} {% macro pagination(base_url, page, total_pages, page_size, params=None) -%} {% if total_pages and total_pages > 1 %} {% endif %} {%- endmacro %}