{% extends "admin/base.html" %} {% from "admin/components/icons.html" import icon %} {% block title %}{{ _(dashboard.title) }}{% endblock %} {% block content %} {% set widget_icons = { "admin/widgets/metric.html": "metric", "admin/widgets/progress.html": "progress", "admin/widgets/table.html": "table", "admin/widgets/chart.html": "chart", "admin/widgets/activity.html": "activity", "admin/widgets/donut.html": "donut", "admin/widgets/stat.html": "stat", "admin/widgets/timeline.html": "timeline", "admin/widgets/tabs.html": "tabs", } %}
{% for widget in widgets %} {% set widget_data = widget.get_data() %}
{{ icon(widget_icons.get(widget.template, "metric"), "w-5 h-5") }}

{{ _(widget.title) }}

{# Bounded, so a widget with hundreds of rows scrolls inside its own card instead of stretching every card beside it. #}
{% include widget.template %}
{% endfor %} {% if not widgets %}

{{ _("No widgets configured.") }}

{% endif %}
{% endblock %}