From 4e16f71641b90defc6454b80735115f6a39095c5 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Thu, 11 Aug 2016 16:09:31 -0300 Subject: [PATCH] Adiciona navbar --- sapl/materia/views.py | 4 +- .../materia/prop_devolvidas_list.html | 66 ++++++++++--------- .../materia/prop_pendentes_list.html | 50 +++++++------- .../materia/prop_recebidas_list.html | 66 ++++++++++--------- .../templates/materia/receber_proposicao.html | 3 + sapl/templates/materia/subnav_prop.html | 6 ++ sapl/templates/materia/subnav_prop.yaml | 3 - 7 files changed, 111 insertions(+), 87 deletions(-) create mode 100644 sapl/templates/materia/subnav_prop.html delete mode 100644 sapl/templates/materia/subnav_prop.yaml diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 4d5fecb07..9ae082560 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -134,7 +134,7 @@ class ProposicaoPendente(ListView): return Proposicao.objects.filter( data_envio__isnull=False, data_recebimento__isnull=True, - data_devolucao_isnull=True) + data_devolucao__isnull=True) def get_context_data(self, **kwargs): context = super(ProposicaoPendente, self).get_context_data(**kwargs) @@ -156,7 +156,7 @@ class ProposicaoRecebida(ListView): return Proposicao.objects.filter( data_envio__isnull=False, data_recebimento__isnull=False, - data_devolucao_isnull=True) + data_devolucao__isnull=True) def get_context_data(self, **kwargs): context = super(ProposicaoRecebida, self).get_context_data(**kwargs) diff --git a/sapl/templates/materia/prop_devolvidas_list.html b/sapl/templates/materia/prop_devolvidas_list.html index fb4b5a5a0..04089432e 100644 --- a/sapl/templates/materia/prop_devolvidas_list.html +++ b/sapl/templates/materia/prop_devolvidas_list.html @@ -1,37 +1,43 @@ {% extends "base.html" %} {% load i18n %} + +{% block sections_nav %} {% include 'materia/subnav_prop.html'%} {% endblock sections_nav %} + {% block base_content %} - {% if not object_list %} -

{{ NO_ENTRIES_MSG }}

- {% else %} - - - - - - - - - - - - {% for prop in object_list %} +
+ Proposições Não Incorporadas + {% if not object_list %} +

{{ NO_ENTRIES_MSG }}

+ {% else %} +
Data do DevoluçãoTipoDescriçãoAutorVínculo
+ - - - - - + + + + + - {% endfor %} - -
{{ prop.data_devolucao|date:"d/m/Y H:i:s" }}{{ prop.tipo.descricao }}{{ prop.descricao }}{{ prop.autor }} - {% if prop.materia_gerada %} - {{ prop.materia_gerada.tipo.sigla }} {{ prop.materia_gerada.numero }}/{{ prop.materia_gerada.ano }} - {% elif prop.documento_gerado %} - {{ prop.documento_gerado.materia.tipo.sigla }} {{ prop.documento_gerado.materia.numero }}/{{ prop.documento_gerado.materia.ano }} - {% endif %} - Data do DevoluçãoTipoDescriçãoAutorVínculo
- {% endif %} + + + {% for prop in object_list %} + + {{ prop.data_devolucao|date:"d/m/Y H:i:s" }} + {{ prop.tipo.descricao }} + {{ prop.descricao }} + {{ prop.autor }} + + {% if prop.materia_gerada %} + {{ prop.materia_gerada.tipo.sigla }} {{ prop.materia_gerada.numero }}/{{ prop.materia_gerada.ano }} + {% elif prop.documento_gerado %} + {{ prop.documento_gerado.materia.tipo.sigla }} {{ prop.documento_gerado.materia.numero }}/{{ prop.documento_gerado.materia.ano }} + {% endif %} + + + {% endfor %} + + + {% endif %} + {% include 'paginacao.html'%} {% endblock %} diff --git a/sapl/templates/materia/prop_pendentes_list.html b/sapl/templates/materia/prop_pendentes_list.html index f36f3c3c2..825b1fad9 100644 --- a/sapl/templates/materia/prop_pendentes_list.html +++ b/sapl/templates/materia/prop_pendentes_list.html @@ -1,29 +1,35 @@ {% extends "base.html" %} {% load i18n %} + +{% block sections_nav %} {% include 'materia/subnav_prop.html'%} {% endblock sections_nav %} + {% block base_content %} - {% if not object_list %} -

{{ NO_ENTRIES_MSG }}

- {% else %} - - - - - - - - - - - {% for prop in object_list %} +
+ Proposições Não Recebidas + {% if not object_list %} +

{{ NO_ENTRIES_MSG }}

+ {% else %} +
Data de EnvioTipoDescriçãoAutor
+ - - - - + + + + - {% endfor %} - -
{{ prop.data_envio|date:"d/m/Y H:i:s" }}{{ prop.tipo.descricao }}{{ prop.descricao }}{{ prop.autor }}Data de EnvioTipoDescriçãoAutor
- {% endif %} + + + {% for prop in object_list %} + + {{ prop.data_envio|date:"d/m/Y H:i:s" }} + {{ prop.tipo.descricao }} + {{ prop.descricao }} + {{ prop.autor }} + + {% endfor %} + + + {% endif %} + {% include 'paginacao.html'%} {% endblock %} diff --git a/sapl/templates/materia/prop_recebidas_list.html b/sapl/templates/materia/prop_recebidas_list.html index 3e9219a85..08ccfe473 100644 --- a/sapl/templates/materia/prop_recebidas_list.html +++ b/sapl/templates/materia/prop_recebidas_list.html @@ -1,37 +1,43 @@ {% extends "base.html" %} {% load i18n %} + +{% block sections_nav %} {% include 'materia/subnav_prop.html'%} {% endblock sections_nav %} + {% block base_content %} - {% if not object_list %} -

{{ NO_ENTRIES_MSG }}

- {% else %} - - - - - - - - - - - - {% for prop in object_list %} +
+ Proposições Incorporadas + {% if not object_list %} +

{{ NO_ENTRIES_MSG }}

+ {% else %} +
Data do RecebimentoTipoDescriçãoAutorVínculo
+ - - - - - + + + + + - {% endfor %} - -
{{ prop.data_recebimento|date:"d/m/Y H:i:s" }}{{ prop.tipo.descricao }}{{ prop.descricao }}{{ prop.autor }} - {% if prop.materia_gerada %} - {{ prop.materia_gerada.tipo.sigla }} {{ prop.materia_gerada.numero }}/{{ prop.materia_gerada.ano }} - {% elif prop.documento_gerado %} - {{ prop.documento_gerado.materia.tipo.sigla }} {{ prop.documento_gerado.materia.numero }}/{{ prop.documento_gerado.materia.ano }} - {% endif %} - Data do RecebimentoTipoDescriçãoAutorVínculo
- {% endif %} + + + {% for prop in object_list %} + + {{ prop.data_recebimento|date:"d/m/Y H:i:s" }} + {{ prop.tipo.descricao }} + {{ prop.descricao }} + {{ prop.autor }} + + {% if prop.materia_gerada %} + {{ prop.materia_gerada.tipo.sigla }} {{ prop.materia_gerada.numero }}/{{ prop.materia_gerada.ano }} + {% elif prop.documento_gerado %} + {{ prop.documento_gerado.materia.tipo.sigla }} {{ prop.documento_gerado.materia.numero }}/{{ prop.documento_gerado.materia.ano }} + {% endif %} + + + {% endfor %} + + + {% endif %} + {% include 'paginacao.html'%} {% endblock %} diff --git a/sapl/templates/materia/receber_proposicao.html b/sapl/templates/materia/receber_proposicao.html index e327bb6d5..888820934 100644 --- a/sapl/templates/materia/receber_proposicao.html +++ b/sapl/templates/materia/receber_proposicao.html @@ -1,5 +1,8 @@ {% extends "crud/form.html" %} {% load i18n %} + +{% block sections_nav %} {% include 'materia/subnav_prop.html'%} {% endblock sections_nav %} + {% load crispy_forms_tags %} {% block extra_msg %}

{{msg}}

diff --git a/sapl/templates/materia/subnav_prop.html b/sapl/templates/materia/subnav_prop.html new file mode 100644 index 000000000..0cf82c77e --- /dev/null +++ b/sapl/templates/materia/subnav_prop.html @@ -0,0 +1,6 @@ + diff --git a/sapl/templates/materia/subnav_prop.yaml b/sapl/templates/materia/subnav_prop.yaml deleted file mode 100644 index 067b88ee4..000000000 --- a/sapl/templates/materia/subnav_prop.yaml +++ /dev/null @@ -1,3 +0,0 @@ -{% load i18n %} -- title: {% trans 'Receber Proposição' %} - url: