From e34192a22f0980eebcfc6ac5a2a8088ae98a1f07 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Thu, 9 Jun 2022 09:32:01 -0300 Subject: [PATCH] Fix #3562 --- .../compilacao/normajuridica_widget_top.html | 45 +++++++++++++++++++ sapl/templates/compilacao/text_list.html | 28 +++++++++++- .../compilacao/text_list__embedded.html | 15 ------- 3 files changed, 71 insertions(+), 17 deletions(-) create mode 100644 sapl/templates/compilacao/normajuridica_widget_top.html diff --git a/sapl/templates/compilacao/normajuridica_widget_top.html b/sapl/templates/compilacao/normajuridica_widget_top.html new file mode 100644 index 000000000..8b1b8a0a0 --- /dev/null +++ b/sapl/templates/compilacao/normajuridica_widget_top.html @@ -0,0 +1,45 @@ +{% load i18n %} +{% load compilacao_filters %} +{% load common_tags%} + +
+ {% if n.get_normas_relacionadas.1|length > 0 %} + {% for r in n.get_normas_relacionadas.1 %} + {% if r.tipo_vinculo.revoga_integralmente %} +
+
+ {{ r.tipo_vinculo.descricao_passiva }}  + + {{ r.norma_principal.epigrafe }} + +
+
+ {% endif %} + {% endfor %} + {% endif %} + + {% if n.get_normas_relacionadas.1|length > 0 %} + {% for r in n.get_normas_relacionadas.1 %} + {% if not r.tipo_vinculo.revoga_integralmente %} +
+ {{ r.tipo_vinculo.descricao_passiva }}  + + {{ r.norma_principal.epigrafe }} + +
+ {% endif %} + {% endfor %} + {% endif %} + + {% if n.get_normas_relacionadas.0|length > 0 %} + {% for p in n.get_normas_relacionadas.0 %} +
+ {{ p.tipo_vinculo.descricao_ativa }}  + + {{ p.norma_relacionada.epigrafe }} + +
+ {% endfor %} + {% endif %} + +
diff --git a/sapl/templates/compilacao/text_list.html b/sapl/templates/compilacao/text_list.html index 39c2b84cc..b56e42306 100644 --- a/sapl/templates/compilacao/text_list.html +++ b/sapl/templates/compilacao/text_list.html @@ -3,16 +3,40 @@ {% load compilacao_filters %} {% load common_tags %} + + {% block base_content %} {% block actions %} {{block.super}} {% endblock %} + {% block detail_content %} - {{block.super}} + {{block.super}} {% endblock %} - + + + {% if object_list %} + {% if 'print' not in request.GET %} +
+ {% if sapl_as_sapn %} + {% trans 'Fazer nova pesquisa' %} + {% endif %} + {% trans 'Preparar para impressão' %} +
+ {% endif %} + +
+ a + A +
+ {% endif %} + + {% with object.content_object as n %} + {% include 'compilacao/normajuridica_widget_top.html' %} + {% endwith %} + {% include 'compilacao/text_list__embedded.html'%} {{object.tipo_ta.rodape_global|dont_break_out}} diff --git a/sapl/templates/compilacao/text_list__embedded.html b/sapl/templates/compilacao/text_list__embedded.html index 758f8f498..6721e1b59 100644 --- a/sapl/templates/compilacao/text_list__embedded.html +++ b/sapl/templates/compilacao/text_list__embedded.html @@ -3,21 +3,6 @@ {% load common_tags %}
- {% if object_list %} - {% if 'print' not in request.GET %} - - {% endif %} - -
- a - A -
- {% endif %} {% for key, values in view.get_vigencias.items %} {% if forloop.first %}