{% for w in widgets %} {% if w.kind == 'callout' %}
{{ w.title }} {% if w.message %}{{ w.message }}{% endif %}
{% if w.safe_action_href and w.action_label %} {{ w.action_label }} {{ deck_icon("arrow-right", 12) }} {% endif %}
{% elif w.kind == 'kpi' %}
{% if w.safe_href %}{% else %}{% endif %}
{% elif w.kind == 'chart' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
{{ w.chart_type | upper }}
{{ w.chart_svg }}
{% elif w.kind == 'heatmap' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
91D GRID
{{ w.heatmap_svg }}
{% elif w.kind == 'statbars' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
{{ w.bars_svg }}
{% elif w.kind == 'gauge' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
{{ w.gauge_svg }} {% if w.details %}
{% for k, v in w.details %}
{{ k }} {{ v }}
{% endfor %}
{% endif %}
{% elif w.kind == 'timeline' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
    {% for ev in w.safe_events %}
  1. {% if ev.href %}{{ ev.title }}{% else %}{{ ev.title }}{% endif %} {{ ev.time }}
    {% if ev.detail %}
    {{ ev.detail }}
    {% endif %}
  2. {% else %}
  3. No timeline events.
  4. {% endfor %}
{% elif w.kind == 'table' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
{% if w.safe_href %}{{ w.href_label }}{% endif %}
{% for h in w.headers %}{% endfor %} {% for row in w.rows %} {% for cell in row %}{% endfor %} {% else %} {% endfor %}
{{ h }}
{{ cell }}
No records
{% elif w.kind == 'activity' %}

{{ w.title }}

{% if w.subtitle %}

{{ w.subtitle }}

{% endif %}
{% if can_view_audit %} Full Ledger {% endif %}
{% for entry in w.entries %}
{{ entry.action }} {{ entry.model_label }} {{ entry.record_repr }}
{% if entry.changes %}
{% for field, delta in (entry.changes.items() | list)[:3] %}
{{ field }}: {% if delta.old is not none %}{{ delta.old }}{% endif %} → {{ delta.new }}
{% endfor %}
{% endif %}
{{ entry.actor_name }}
{{ format_dt(entry.timestamp, '%m-%d %H:%M') }}
{% else %}
No audit events recorded yet.
{% endfor %}
{% elif w.kind == 'notes' %}

{{ w.title }}

{% for line in w.lines %}

{{ line }}

{% endfor %}
{% endif %} {% endfor %}