{% if all_data and len(all_data["items"])>0 and columns %}
Actions
{# columns can be strings or objects with .key and optional .label #}
{% for col in columns %}
{% if col not in model.exclude_from_table() %}
{% set col_key = (col.key if col is not string and col.key is defined else col) %}
{% if model.form_labels_map().get(col.key if col is not string and col.key is defined else col) %}
{{ model.form_labels_map().get(col_key) }}
{% else %}
{% set col_label = (
col.label if col is not string and col.label is defined
else (col_key | replace('_',' ') | title)
) %}
{{ col_label }}
{% endif %}
{% endif %}
{% endfor %}
{% for row in all_data["items"] %}
{% if can_update %}
{% endif %}
{% if can_delete %}
{% endif %}
{% if not can_update and not can_delete %}
No actions available
{% endif %}
{% for col in columns %}
{% set col_key = (col.key if col is not string and col.key is defined else col) %}
{% if col_key not in model.exclude_from_table() %}
{% set value = attribute(row, col_key) %}
{% if value is boolean %}
{{ "Yes" if value else "No" }}
{% elif value is none %}
—
{% else %}
{{ value }}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% else %}
No data available.
{% endif %}
{% if all_data["pages"] > 1 %}
{% endif %}
{% if can_delete %}
{% endif %}
{% if can_create %}
{% endif %}
{% endblock %}