{# Grid region — first adopter of the shared region_card macro (UX-035). #} {% from 'macros/status_badge.html' import render_status_badge %} {% from 'macros/region_wrapper.html' import region_card %} {% call region_card(title) %} {% if items %}
{{ col.label }}: {% if col.type == "badge" %} {{ render_status_badge(value=item[col.key]) }} {% elif col.type == "bool" %} {{ item[col.key] | bool_icon }} {% elif col.type == "date" %} {{ item[col.key] | dateformat }} {% elif col.type == "currency" %} {{ item[col.key] | currency }} {% elif col.type == "ref" %} {% set ref = item[col.key] %} {% set display_name = item.get(col.key ~ "_display", "") %} {% if ref is mapping %} {% set display_name = display_name or (ref | ref_display) %} {% if col.ref_route and ref.get("id") %} {{ display_name }} {% else %}{{ display_name }}{% endif %} {% elif display_name %}{{ display_name }}{% elif ref %}-{% else %}-{% endif %} {% else %} {{ item[col.key] | default("") | truncate_text }} {% endif %}
{% endif %} {% endfor %}