mirror of https://github.com/interlegis/sigi.git
Browse Source
add: adicionando base.html e export.html fix: corrige duplicação da navegação "Ínicio" no breadcrumbs, sobrescrevendo corretamente o bloco nav-breadcrumbs do Admin para evitar repetição. Esse bloco estava contido no import_export/base.html fix: corrigindo export.html em labels e checkboxes e colocando o bt5 no botao enviar remove: apagando arquivos desnecessários feat: melhorando a estetica do exportpull/184/head
moonshinerd
2 weeks ago
2 changed files with 103 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||
{% extends "admin/base_site.html" %} |
|||
{% load i18n admin_modify %} |
|||
{% load admin_urls %} |
|||
{% load static %} |
|||
|
|||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %} |
|||
|
|||
{% if not is_popup %} |
|||
{% block nav-breadcrumbs %} |
|||
<nav aria-label="{% translate 'Breadcrumbs' %}"> |
|||
{% block breadcrumbs %} |
|||
<div class="breadcrumbs"> |
|||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> |
|||
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> |
|||
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> |
|||
› {% block breadcrumbs_last %}{% endblock %} |
|||
</div> |
|||
{% endblock %} |
|||
</nav> |
|||
{% endblock %} |
|||
{% endif %} |
|||
|
|||
{% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %} |
@ -0,0 +1,80 @@ |
|||
{% extends "admin/import_export/base.html" %} |
|||
{% load i18n %} |
|||
{% load admin_urls %} |
|||
{% load import_export_tags %} |
|||
|
|||
{% 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 #} |
|||
{% if form.initial.export_items %} |
|||
<p> |
|||
{% blocktranslate count len=form.initial.export_items|length %} |
|||
Export {{ len }} selected item. |
|||
{% plural %} |
|||
Export {{ len }} selected items. |
|||
{% endblocktranslate %} |
|||
</p> |
|||
{% 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 %} |
|||
<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 %} |
|||
{% 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> |
|||
{{ 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> |
|||
|
|||
{# 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 mt-4"> |
|||
<input type="submit" class="btn btn-outline-primary" value="{% translate "Submit" %}"> |
|||
</div> |
|||
|
|||
</form> |
|||
{% endblock %} |
Loading…
Reference in new issue