From 6d998818731da2d01033af9a456a2fb24bc4b6fe Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Mon, 25 Feb 2019 17:51:27 +0100 Subject: [PATCH] Overwrite admin templates (6) --- templates/admin/edit_inline/stacked.html | 34 +++++++++++ templates/admin/edit_inline/tabular.html | 75 ++++++++++++++++++++++++ templates/admin/index.html | 40 +++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 templates/admin/edit_inline/stacked.html create mode 100644 templates/admin/edit_inline/tabular.html create mode 100644 templates/admin/index.html diff --git a/templates/admin/edit_inline/stacked.html b/templates/admin/edit_inline/stacked.html new file mode 100644 index 00000000..d9855963 --- /dev/null +++ b/templates/admin/edit_inline/stacked.html @@ -0,0 +1,34 @@ +{# Please keep this template in sync with django/contrib/admin one #} +{% load i18n admin_urls static %} +
+
+

{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}

+{{ inline_admin_formset.formset.management_form }} +{{ inline_admin_formset.formset.non_form_errors }} + +{% for inline_admin_form in inline_admin_formset %}
+

+
+ {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %} + + + + {% endif %} + {% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %} +
+ {{ inline_admin_formset.opts.verbose_name|capfirst }}: {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %}#{{ forloop.counter }}{% endif %} +

+ {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %} + {% for fieldset in inline_admin_form %} + {% include "admin/includes/fieldset.html" %} + {% endfor %} + {% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %} + {{ inline_admin_form.fk_field.field }} +
{% endfor %} +
+
diff --git a/templates/admin/edit_inline/tabular.html b/templates/admin/edit_inline/tabular.html new file mode 100644 index 00000000..9b7569a1 --- /dev/null +++ b/templates/admin/edit_inline/tabular.html @@ -0,0 +1,75 @@ +{# Please keep this template in sync with django/contrib/admin one #} +{% load i18n admin_urls static admin_modify %} +
+ +
diff --git a/templates/admin/index.html b/templates/admin/index.html new file mode 100644 index 00000000..713fe508 --- /dev/null +++ b/templates/admin/index.html @@ -0,0 +1,40 @@ +{# Please keep this template in sync with django/contrib/admin one #} +{% 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 %} +
+

{{ app.name }}

+
    + {% for model in app.models %} +
  • + {% if model.admin_url %} + {{ model.name }} + {% else %} + {{ model.name }} + {% endif %} +
  • + {% endfor %} +
+
+ {% endfor %} +{% else %} +

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

+{% endif %} +
+{% endblock %} + +{% block sidebar %} +{% endblock %}