{% extends "admin/layout.html" %} {% block content %} {# Breadcrumb #} {# Page heading #}

{{ resource.get_label_plural() }}

{% if can_create %}
Create {{ resource.get_label() }}
{% endif %}
{# Metrics / stats cards #} {% if metrics %}
{% for metric in metrics %}
{{ metric.name }}
{{ metric.get('formatted', metric.get('value', '')) }}
{% if metric.get('change') is not none %}
{% if metric.get('change', 0) >= 0 %} {% else %} {% endif %} {{ metric.get('change', 0) | abs }}%
{% endif %}
{% endfor %}
{% endif %} {# Toolbar: search + filters + actions #}
{% for f in filters %}
{% endfor %} {% if sort %}{% endif %} {% if dir %}{% endif %} {% if search %} Clear {% endif %}
{% if actions %} {% endif %}
{# Table #}
{% if actions %} {% endif %} {% if actions %} {% endif %} {% for field in fields %} {% endfor %} {% for item in items %} {% if actions %} {% endif %} {% for field in fields %} {% endfor %} {% else %} {% endfor %}
{% if field._sortable %} {% set next_dir = 'asc' if (sort == field.attribute and dir == 'desc') else 'desc' %} {{ field.label }} {% if sort == field.attribute %} {% if dir == 'asc' %}↑{% else %}↓{% endif %} {% endif %} {% else %} {{ field.label }} {% endif %} Actions
{% if field.field_type == 'boolean' %} {% if field.value_for(item) %} Yes {% else %} No {% endif %} {% elif field.field_type == 'badge' %} {% set val = field.value_for(item) %} {% set colour = field.get_colour(val) %} {% if colour == 'green' %} {{ val }} {% elif colour == 'red' %} {{ val }} {% elif colour == 'yellow' %} {{ val }} {% elif colour == 'blue' %} {{ val }} {% else %} {{ val }} {% endif %} {% elif field.field_type == 'image' %} {% set img_url = field.url_for(item) %} {% if img_url %} {{ field.label }} {% else %} — {% endif %} {% else %} {{ field.display_value(item) }} {% endif %}
View {% if can_update %} Edit {% endif %} {% if can_delete %}
{% endif %}

No {{ resource.get_label_plural() | lower }}

{% if can_create %}

Get started by creating a new {{ resource.get_label() | lower }}.

{% endif %}
{# Pagination footer #} {% if pagination.total > 0 %} {% set p = pagination %}
{# Left: row count + per-page selector #}
Showing {{ (p.current_page - 1) * p.per_page + 1 }} to {{ [p.current_page * p.per_page, p.total] | min }} of {{ p.total }}
{# Right: page navigation #} {% if p.last_page > 1 %} {% endif %}
{% endif %} {# Actions modal #} {% if actions %} {% endif %} {% endblock %} {% block scripts %} {% endblock %}