diff --git a/templates/admin/change_form.html b/templates/admin/change_form.html new file mode 100644 index 00000000..0224fdbd --- /dev/null +++ b/templates/admin/change_form.html @@ -0,0 +1,86 @@ +{# Please keep this template in sync with django/contrib/admin one #} +{% extends "admin/base_site.html" %} +{% load i18n admin_urls static admin_modify %} + +{% block extrahead %}{{ block.super }} + +{{ media }} +{% endblock %} + +{% block extrastyle %}{{ block.super }}{% endblock %} + +{% block coltype %}colM{% endblock %} + +{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %} + +{% if not is_popup %} +{% block breadcrumbs %} + +{% endblock %} +{% endif %} + +{% block content %}
+{% block object-tools %} +{% if change %}{% if not is_popup %} + +{% endif %}{% endif %} +{% endblock %} +
{% csrf_token %}{% block form_top %}{% endblock %} +
+{% if is_popup %}{% endif %} +{% if to_field %}{% endif %} +{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} +{% if errors %} +

+ {% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} +

+ {{ adminform.form.non_field_errors }} +{% endif %} + +{% block field_sets %} +{% for fieldset in adminform %} + {% include "admin/includes/fieldset.html" %} +{% endfor %} +{% endblock %} + +{% block after_field_sets %}{% endblock %} + +{% block inline_field_sets %} +{% for inline_admin_formset in inline_admin_formsets %} + {% include inline_admin_formset.opts.template %} +{% endfor %} +{% endblock %} + +{% block after_related_objects %}{% endblock %} + +{% block submit_buttons_bottom %}{% submit_row %}{% endblock %} + +{% block admin_change_form_document_ready %} + +{% endblock %} + +{# JavaScript for prepopulated fields #} +{% prepopulated_fields_js %} + +
+
+{% endblock %} diff --git a/templates/admin/includes/fieldset.html b/templates/admin/includes/fieldset.html new file mode 100644 index 00000000..f7858c61 --- /dev/null +++ b/templates/admin/includes/fieldset.html @@ -0,0 +1,27 @@ +{# Please keep this template in sync with django/contrib/admin one #} +{% load bootstrap3 %} +
+ {% if fieldset.name %}

{{ fieldset.name }}

{% endif %} + {% if fieldset.description %} +
{{ fieldset.description|safe }}
+ {% endif %} + {% for line in fieldset %} +
+ {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %} + {% for field in line %} + + {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %} + {% if field.is_checkbox %} + {{ field.field }}{{ field.label_tag }} + {% if field.field.help_text %} +
{{ field.field.help_text|safe }}
+ {% endif %} + {% else %} + {{ field.label_tag }} + {% bootstrap_field field.field show_label=False %} + {% endif %} +
+ {% endfor %} + + {% endfor %} +
diff --git a/templates/admin/submit_line.html b/templates/admin/submit_line.html index cdae3ae5..d7002fd6 100644 --- a/templates/admin/submit_line.html +++ b/templates/admin/submit_line.html @@ -1,63 +1,38 @@ -{% comment %} -Re2o est un logiciel d'administration développé initiallement au rezometz. Il -se veut agnostique au réseau considéré, de manière à être installable en -quelques clics. - -Copyright © 2019 Alexandre Iooss - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -{% endcomment %} - +{# Please keep this template in sync with django/contrib/admin one #} {% load i18n admin_urls %} -
- {% if show_save %} - - {% endif %} - - {% if show_delete_link %} - {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} - - - {% trans "Delete" %} - - {% endif %} - - {% if show_save_as_new %} - - {% endif %} - - {% if show_save_and_add_another %} - - {% endif %} - - {% if show_save_and_continue %} - - {% endif %} +
+{% if show_save %} + +{% endif %} +{% if show_delete_link %} + {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} + + + {% trans "Delete" %} + +{% endif %} +{% if show_save_as_new %} + +{% endif %} +{% if show_save_and_add_another %} + +{% endif %} +{% if show_save_and_continue %} + +{% endif %}
diff --git a/templates/reversion/change_list.html b/templates/reversion/change_list.html new file mode 100644 index 00000000..b731f23a --- /dev/null +++ b/templates/reversion/change_list.html @@ -0,0 +1,11 @@ +{# Please keep this template in sync with reversion one #} +{% extends "admin/change_list.html" %} +{% load i18n admin_urls %} + + +{% block object-tools-items %} + {% if not is_popup and has_add_permission and has_change_permission %} +
  • {% blocktrans with cl.opts.verbose_name_plural|escape as name %}Recover deleted {{name}}{% endblocktrans %}
  • + {% endif %} + {{block.super}} +{% endblock %}