From 9f1625ec58e1086afc31f64a368eefb21e5a3b4e Mon Sep 17 00:00:00 2001 From: moonshinerd Date: Tue, 19 Nov 2024 20:02:11 -0300 Subject: [PATCH] feat: melhorando a estetica do export --- .../templates/admin/import_export/export.html | 79 +++++++++++-------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/sigi/templates/admin/import_export/export.html b/sigi/templates/admin/import_export/export.html index 34c9edd..dc6870d 100644 --- a/sigi/templates/admin/import_export/export.html +++ b/sigi/templates/admin/import_export/export.html @@ -3,63 +3,78 @@ {% load admin_urls %} {% load import_export_tags %} -{% block extrahead %}{{ block.super }} +{% 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 %} + {# 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 #} + {# 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 %}

+

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

- {% for field in form.visible_fields %} -
- -
- {{ field }} -
-
- {% endfor %} + +
+ {% for field in form.visible_fields %} + {% if field.name != "format" %} {# Excluindo o campo "Formato" da lista automática #} +
+
+
+ + {{ field }} + {% if field.field.help_text %} + + {{ field.field.help_text|safe }} + + {% endif %} +
+
+
+ {% endif %} + {% endfor %} +
+ {% for field in form.hidden_fields %} - {{ field }} + {{ field }} {% endfor %} -
- - -
- {{ form.non_field_errors }} + + + {# Campo "Formato" separado, posicionado de forma independente #} +
+ + {{ form.format }}
- -
+ +
+ {% endblock %}