Browse Source

feat: melhorando a estetica do export

pull/183/head
moonshinerd 1 month ago
parent
commit
9f1625ec58
  1. 41
      sigi/templates/admin/import_export/export.html

41
sigi/templates/admin/import_export/export.html

@ -3,24 +3,23 @@
{% load admin_urls %}
{% load import_export_tags %}
{% block extrahead %}{{ block.super }}
{% block extrahead %}
{{ block.super }}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
{{ form.media }}
{% endblock %}
{% block breadcrumbs_last %}
{% translate "Export" %}
{% endblock %}
{% block content %}
{% if form.errors %}
{{ form.errors }}
{% endif %}
<form action="{{ export_url }}" method="POST">
{% csrf_token %}
{# export request has originated from an Admin UI action #}
{# Export request has originated from an Admin UI action #}
{% if form.initial.export_items %}
<p>
{% blocktranslate count len=form.initial.export_items|length %}
@ -31,35 +30,51 @@
</p>
{% 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 %}
<p></p>
<fieldset class="module">
<p style="padding: 0;">{% translate "This exporter will export the following fields:" %}</p>
<div class="row">
{% for field in form.visible_fields %}
<div class="d-flex align-items-center mb-3">
<label for="{{ field.id_for_label }}" class="form-label me-2 mb-0">
{{ field.label }}:
{% if field.name != "format" %} {# Excluindo o campo "Formato" da lista automática #}
<div class="col-md-4 col-lg-3 mb-4">
<div class="card h-100" style="width: 100%;">
<div class="card-body">
<label for="{{ field.id_for_label }}" class="form-label d-block">
{{ field.label }}
</label>
<div style="margin-left: 15px;"> <!-- Ajusta o checkbox para frente -->
{{ field }}
{% if field.field.help_text %}
<small class="text-muted d-block mt-1">
{{ field.field.help_text|safe }}
</small>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
</fieldset>
<div>
{{ form.non_field_errors }}
{# Campo "Formato" separado, posicionado de forma independente #}
<div class="mt-4">
<label for="{{ form.format.id_for_label }}" class="form-label">{{ form.format.label }}</label>
{{ form.format }}
</div>
<div class="submit-row">
<div class="submit-row mt-4">
<input type="submit" class="btn btn-outline-primary" value="{% translate "Submit" %}">
</div>
</form>
{% endblock %}

Loading…
Cancel
Save