{% comment %} Responsive data-table wrapper — renders the table on md+ and a card-stack fallback on mobile so RIMS list views don't blow past the viewport. Caller passes the full rendered table_html and the same rows as a list of dicts {title, subtitle?, badges?, meta?, href?, amount?, amount_hint?, actions?} so the mobile stack stays in sync with table headers. For most list views the cleaner path is to use approval_queue.html, which already includes both layouts. responsive_table is for cases where the existing table markup is complex enough that re-shaping it into the approval_queue contract isn't worth it — drop the table HTML in unchanged and provide row dicts for the mobile fallback. Args: table_html : pre-rendered markup (use {% include %} for the rows) rows : list of dicts matching approval_queue items contract empty_state: optional dict for empty rendering {% endcomment %} {% if rows or table_html %}
{% for row in rows %}
{% if row.href %} {{ row.title }} {% else %}

{{ row.title }}

{% endif %} {% if row.amount %}

{{ row.amount }}

{% endif %}
{% if row.subtitle %}

{{ row.subtitle }}

{% endif %} {% if row.badges %}
{% for b in row.badges %}{{ b.label }}{% endfor %}
{% endif %} {% if row.meta %}
{% for m in row.meta %}
{{ m.label }}:
{{ m.value }}
{% endfor %}
{% endif %}
{% endfor %}
{% else %} {% include "components/empty_state.html" with heading=empty_state.heading subtext=empty_state.subtext primary_url=empty_state.primary_url primary_label=empty_state.primary_label icon_path=empty_state.icon_path %} {% endif %}