From a8aae1a314b999684ac484d2106a100b3acd0bc4 Mon Sep 17 00:00:00 2001 From: Lude Ribeiro Date: Wed, 23 Feb 2022 16:33:39 -0300 Subject: [PATCH] =?UTF-8?q?Subindo=20o=20filtro=20provis=C3=B3rio=20com=20?= =?UTF-8?q?as=20escalas=20corretas=20dos=20itens=20na=20tela?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Davi-Galati --- sigi/apps/convenios/admin.py | 3 - sigi/templates/admin/change_list.html | 103 +++++++++++++++++++++----- 2 files changed, 86 insertions(+), 20 deletions(-) diff --git a/sigi/apps/convenios/admin.py b/sigi/apps/convenios/admin.py index 6b8cab3..5800869 100644 --- a/sigi/apps/convenios/admin.py +++ b/sigi/apps/convenios/admin.py @@ -10,11 +10,8 @@ from sigi.apps.utils import queryset_ascii from sigi.apps.servidores.models import Servidor from sigi.apps.casas.admin import ConveniosInline, GerentesInterlegisFilter from sigi.apps.utils.mixins import CartExportReportMixin, LabeledResourse -<<<<<<< HEAD from django_weasyprint.views import WeasyTemplateResponse -======= from sigi.apps.utils.filters import DateRangeFilter ->>>>>>> 96ea3b8f2dd4c7380c7e59f4a0546e6c27b09ffe class ConvenioExportResourse(LabeledResourse): class Meta: diff --git a/sigi/templates/admin/change_list.html b/sigi/templates/admin/change_list.html index 91dd70e..4cc8e5a 100644 --- a/sigi/templates/admin/change_list.html +++ b/sigi/templates/admin/change_list.html @@ -2,15 +2,49 @@ {% load i18n static admin_list %} {% load i18n admin_urls %} +{% block extrastyle %} + {{ block.super }} + + + +{% endblock extrastyle %} + {% block breadcrumbs %}{% endblock %} -{% block object-tools %} -
- +{% block footer %} + {{ block.super }} + + + +{% endblock footer %} + +{% block content %} +
+ {% block object-tools %} +
+ build - -
    - {% block object-tools-items %} + +
      + {% block object-tools-items %} {% if has_add_permission %}
    • {% url cl.opts|admin_urlname:'add' as add_url %} @@ -19,17 +53,52 @@
    • {% endif %} - {% endblock %} -
    + {% endblock %} +
{% endblock %} + {% if cl.formset.errors %} +

+ {% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} +

+ {{ cl.formset.non_form_errors }} + {% endif %} +
-{% block footer %} - {{ block.super }} - -{% endblock footer %} + {% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %} + +
{% csrf_token %} + {% if cl.formset %} +
{{ cl.formset.management_form }}
+ {% endif %} + + {% block result_list %} + {% result_list cl %} + {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} + {% endblock %} + {% block pagination %}{% pagination cl %}{% endblock %} +
+
+
    +
    +
    + {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} +
    +
    + {% block search %}{% search_form cl %}{% endblock %} +
    +
    + {% block filters %} + {% if cl.has_filters %} +
    + + {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} +
    + {% endif %} + {% endblock %} +
    +
    +
+ filter_list +
+{% endblock %}