{% extends 'govuk_frontend_jinja/template.html' %} {% from 'govuk_frontend_jinja/components/service-navigation/macro.html' import govukServiceNavigation %} {% from 'govuk_frontend_jinja/components/footer/macro.html' import govukFooter %} {% import 'admin/layout.html' as layout with context %} {% set containerClasses = '' %} {% set mainClasses = '' %} {% set assetPath = url_for('xgovuk_flask_admin.static', filename='').rstrip('/') %} {% block head %} {{ xgovuk_flask_admin_include_css() | safe }} {% endblock head %} {% block govukHeader %} {% block headerRow %} {{ govukHeader({"classes": "govuk-header--full-width-border"}) }} {% endblock %} {% endblock %} {% block govukServiceNavigation %} {% block headerNav %} {% set service_nav_items = [] %} {% for item in admin_view.admin.menu() %} {% if item.is_category() %} {% set children = item.get_children() %} {% if children %} {% for child in children %} {% if child.is_accessible() and child.is_visible() and not child.is_category() %} {% set item_text = child.name %} {% set _ = service_nav_items.append({ "href": child.get_url(), "text": item_text, "active": child.is_active(admin_view) }) %} {% endif %} {% endfor %} {% endif %} {% else %} {% if item.is_accessible() and item.is_visible() and item.name != "Home" %} {% set _ = service_nav_items.append({ "href": item.get_url(), "text": item.name, "active": item.is_active(admin_view) }) %} {% endif %} {% endif %} {% endfor %} {{ govukServiceNavigation({ "serviceName": xgovuk_flask_admin_service_name, "serviceUrl": url_for(admin_view.admin.endpoint ~ '.index'), "navigation": service_nav_items }) }} {% endblock %} {% endblock %} {% block govukFooter %} {{ govukFooter({}) }} {% endblock %} {% block content %} {% block action_panel %}

Admin dashboard

Use the navigation above to manage your data:

Override blocks in this template to customise the index for your service.

{% endblock %} {% endblock %} {% block bodyEnd %} {{ xgovuk_flask_admin_include_js() | safe }} {% if admin_view.extra_js %} {% for js_url in admin_view.extra_js %} {% endfor %} {% endif %} {% endblock bodyEnd %}