From 7ce630bb33b24f70c4068aac01ba70181152c1ff Mon Sep 17 00:00:00 2001 From: moonshinerd Date: Tue, 19 Nov 2024 18:22:45 -0300 Subject: [PATCH] =?UTF-8?q?add:=20adicionando=20base.html=20e=20export.htm?= =?UTF-8?q?l=20fix:=20corrige=20duplica=C3=A7=C3=A3o=20da=20navega=C3=A7?= =?UTF-8?q?=C3=A3o=20"=C3=8Dnicio"=20no=20breadcrumbs,=20sobrescrevendo=20?= =?UTF-8?q?corretamente=20o=20bloco=20nav-breadcrumbs=20do=20Admin=20para?= =?UTF-8?q?=20evitar=20repeti=C3=A7=C3=A3o.=20Esse=20bloco=20estava=20cont?= =?UTF-8?q?ido=20no=20import=5Fexport/base.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/templates/admin/import_export/base.html | 23 +++++ .../templates/admin/import_export/export.html | 90 +++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 sigi/templates/admin/import_export/base.html create mode 100644 sigi/templates/admin/import_export/export.html diff --git a/sigi/templates/admin/import_export/base.html b/sigi/templates/admin/import_export/base.html new file mode 100644 index 0000000..1a7f6cf --- /dev/null +++ b/sigi/templates/admin/import_export/base.html @@ -0,0 +1,23 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_modify %} +{% load admin_urls %} +{% load static %} + +{% block extrastyle %}{{ block.super }}{% endblock %} + +{% if not is_popup %} + {% block nav-breadcrumbs %} + + {% endblock %} +{% endif %} + +{% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %} diff --git a/sigi/templates/admin/import_export/export.html b/sigi/templates/admin/import_export/export.html new file mode 100644 index 0000000..697c32c --- /dev/null +++ b/sigi/templates/admin/import_export/export.html @@ -0,0 +1,90 @@ +{% extends "admin/import_export/base.html" %} +{% load i18n %} +{% load admin_urls %} +{% load import_export_tags %} + +{% block extrahead %}{{ block.super }} + +{{ form.media }} +{% endblock %} + + +{% block breadcrumbs_last %} +{% translate "Export" %} +{% endblock %} + + +{% block content %} +{% if form.errors %} + {{ form.errors }} +{% endif %} +
+ {% csrf_token %} + {# export request has originated from an Admin UI action #} + {% if form.initial.export_items %} +

+ {% blocktranslate count len=form.initial.export_items|length %} + Export {{ len }} selected item. + {% plural %} + Export {{ len }} selected items. + {% endblocktranslate %} +

+ {% endif %} + + {# fields list is not required with selectable fields form #} + {% if not form.is_selectable_fields_form %} + {% include "admin/import_export/resource_fields_list.html" with import_or_export="export" %} + {% endif %} + +
+ {% for field in form.visible_fields %} +
+ {% if field.field.initial_field %} +

{% translate "This exporter will export the following fields: " %}

+ {% endif %} + {{ field.errors }} + + {% if not field.field.is_selectable_field %} + {{ field.label_tag }} + {% endif %} + + {% if field.field.widget.attrs.readonly %} + {{ field.field.value }} + {{ field.as_hidden }} + {% else %} + {{ field }} + {% endif %} + + {% if field.field.is_selectable_field %} + {{ field.label_tag }} + {% endif %} + + {% if field.field.help_text %} +

{{ field.field.help_text|safe }}

+ {% endif %} +
+ {% endfor %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} +
+ +
+ {{ form.non_field_errors }} +
+ +
+ +
+
+{% endblock %}