{% extends "admin/master.html" %} {% import 'admin/layout.html' as layout with context %} {% block body %}

Dashboard

{%- for item in admin_view.admin.menu() %} {% if not item.is_category() %} {%- if item.is_accessible() and item.is_visible() and item.name != 'Home' -%} {{ dashboard_table(item) }} {% endif %} {% else %} {%- if item.get_children() %}

{% if item.class_name %} {% endif %}{{ item.name }}

{{ dashboard_table(item) }} {% endif -%} {% endif %} {% endfor -%} {% endblock %} {% macro dashboard_table(item) %} {% if not item.is_category() %} {{ dashboard_item(item) }} {% else %} {% for child in item.get_children() %} {{ dashboard_item(child) }} {% endfor %} {% endif %}
{% endmacro %} {% macro dashboard_item(item) %} {% set view = item._view %} {{ layout.menu_icon(item) }} {{ item.name }} List {{ item.name }} {% if view.can_create %} {% set create_url = url_for(view.endpoint ~ '.create_view', url=return_url) %} Create {{ view.model.__label__ }} {% endif %} {% endmacro %}