From 2ae0e6f81e570a75ac27d455db9834c93f66d1fe Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 23 Feb 2023 18:09:15 +0100 Subject: Admin: overload index to add sub-section headers --- ishtar_common/templates/admin/index.html | 91 ++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 ishtar_common/templates/admin/index.html (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/admin/index.html b/ishtar_common/templates/admin/index.html new file mode 100644 index 000000000..1019ea7c0 --- /dev/null +++ b/ishtar_common/templates/admin/index.html @@ -0,0 +1,91 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} + +{% block extrastyle %}{{ block.super }}{% endblock %} + +{% block coltype %}colMS{% endblock %} + +{% block bodyclass %}{{ block.super }} dashboard{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block content %} +
+ +{% if app_list %} + {% for app in app_list %} +
+ + + {% for model in app.models %} + {# Ishtar #} + {% ifchanged model.admin_section %} + {% if model.admin_section or forloop.counter0 %}{% endif %} + {% endifchanged %} + {# Ishtar end #} + + {% if model.admin_url %} + + {% else %} + + {% endif %} + + {% if model.add_url %} + + {% else %} + + {% endif %} + + {% if model.admin_url %} + {% if model.view_only %} + + {% else %} + + {% endif %} + {% else %} + + {% endif %} + + {% endfor %} +
+ {{ app.name }} +
{% if model.admin_section %}{{ model.admin_section }}{% else %} {% endif %}
{{ model.name }}{{ model.name }}{% trans 'Add' %} {% trans 'View' %}{% trans 'Change' %} 
+
+ {% endfor %} +{% else %} +

{% trans "You don't have permission to view or edit anything." %}

+{% endif %} +
+{% endblock %} + +{% block sidebar %} + +{% endblock %} -- cgit v1.2.3