{% extends "admin/base_site.html" %} {% load i18n forge_icons %} {% block content %}
{% include "admin/includes/forge_sidebar.html" %}
{% include "admin/includes/forge_topbar.html" with subtitle="Overview and recent activity" %}
{% with stats|slice:":6" as kpis %} {% with kpis|length as kpi_count %}
{% for card in kpis %}

{% forge_icon card.icon "h-3.5 w-3.5" %} {{ card.label }}

{% if card.trend %} {{ card.trend }} {% endif %}

{{ card.value }}

{% if card.hint %}

{{ card.hint }}

{% elif card.trend %}

Trend updated from current data

{% else %}

Updated just now

{% endif %}
{% endfor %}
{% endwith %} {% endwith %} {% if forge.dashboard_quick_links %} {% endif %} {% if forge.dashboard_alerts %}

{% forge_icon "activity" "h-4 w-4 text-slate-500 shrink-0" %} {% trans "Needs attention" %}

{{ forge.dashboard_alerts|length }}{% trans " alert(s)" %}
{% for alert in forge.dashboard_alerts %}
{% if alert.icon %}{% forge_icon alert.icon "h-4 w-4 text-slate-500" %}{% endif %}

{{ alert.title }}

{% if alert.description %}

{{ alert.description }}

{% endif %} {% if alert.count %}

{{ alert.count }} {% trans "matching record(s)" %}

{% endif %}
{% if alert.url %} {{ alert.cta|default:_("View") }} {% forge_icon "arrow-right" "h-3.5 w-3.5 text-slate-400" %} {% endif %}
{% if alert.rows %}
{% trans "Show matching records" %}
    {% for row in alert.rows %}
  • {% if row.url %} {{ row.label }} {% else %} {{ row.label }} {% endif %} {% if row.value %} {{ row.value }} {% endif %}
  • {% endfor %}
{% endif %}
{% endfor %}
{% endif %}

{% forge_icon "users" "h-4 w-4 text-slate-500" %} Recent users

{% if recent_users_url %} View all {% endif %}
    {% for user_obj in recent_users %}
  • {{ user_obj.get_username }} {{ user_obj.date_joined|date:"M j, Y" }}
  • {% empty %}
  • No users yet.
  • {% endfor %}
{% if recent_records_card %}

{% if recent_records_card.icon %}{% forge_icon recent_records_card.icon "h-4 w-4 text-slate-500" %}{% endif %} {{ recent_records_card.title }}

{% if recent_records_card.changelist_url %} {% trans "View all" %} {% endif %}
    {% for row in recent_records_card.rows %}
  • {% if row.pk and recent_records_card.changelist_url %} {{ row.primary }} {% else %} {{ row.primary }} {% endif %} {% if row.secondary %} {{ row.secondary }} {% endif %}
    {% if row.meta %} {{ row.meta }} {% endif %}
  • {% empty %}
  • {% trans "No records found." %}
  • {% endfor %}
{% endif %}

{% forge_icon "activity" "h-4 w-4 text-slate-500" %} Recent activity

    {% for action in recent_actions %}
  • {{ action.user }} {{ action.action_label|lower }} {{ action.object_repr }}

    {{ action.content_type|capfirst }}

    {{ action.action_time|date:"M j, g:i a" }}
  • {% empty %}
  • No admin actions recorded yet.
  • {% endfor %}
{% if dashboard_cards %} {% for card in dashboard_cards %} {% if card.key == "system-health" %}
{{ card.html|safe }}
{% endif %} {% endfor %} {% endif %}
{% if dashboard_cards %}
{% for card in dashboard_cards %} {% if card.key != "system-health" %}
{{ card.html|safe }}
{% endif %} {% endfor %}
{% endif %}
{% endblock %}