From f66cb413d50befa8363f465be2cb588403d84902 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Wed, 21 Nov 2018 14:03:32 -0200 Subject: [PATCH] correcao de erro quando nao ha presentes --- sapl/sessao/views.py | 4 +- .../sessao/votacao/votacao_nominal_bloco.html | 2 +- .../votacao/votacao_simbolica_bloco.html | 71 ++++++++++--------- 3 files changed, 42 insertions(+), 35 deletions(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 703c2c401..b41d327a9 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -3278,7 +3278,7 @@ class VotacaoEmBlocoSimbolicaView(TemplateView): def post(self, request, *args, **kwargs): if not 'context' in locals(): - context = {} + context = {'pk': self.kwargs['pk']} if 'origem' in request.POST: marcadas = request.POST.getlist('marcadas_id_1') @@ -3415,7 +3415,7 @@ class VotacaoEmBlocoNominalView(TemplateView): form = VotacaoNominalForm(request.POST) if not 'context' in locals(): - context = {} + context = {'pk': self.kwargs['pk']} if 'origem' in request.POST: # form = VotacaoNominalForm(request.POST) diff --git a/sapl/templates/sessao/votacao/votacao_nominal_bloco.html b/sapl/templates/sessao/votacao/votacao_nominal_bloco.html index a3b50c43e..d5fdee35c 100644 --- a/sapl/templates/sessao/votacao/votacao_nominal_bloco.html +++ b/sapl/templates/sessao/votacao/votacao_nominal_bloco.html @@ -32,7 +32,7 @@ - Voltar + Voltar {% else %}
diff --git a/sapl/templates/sessao/votacao/votacao_simbolica_bloco.html b/sapl/templates/sessao/votacao/votacao_simbolica_bloco.html index cfc3dae59..0196427ad 100644 --- a/sapl/templates/sessao/votacao/votacao_simbolica_bloco.html +++ b/sapl/templates/sessao/votacao/votacao_simbolica_bloco.html @@ -47,44 +47,51 @@
+ {% if total_presentes == 0 %} + + Voltar + {% else %} -
-
Sim:
-
Não:
-
Abstenções:
-
+
+
Sim:
+
Não:
+
Abstenções:
+
-
-
- A totalização inclui o voto do Presidente? - -
+
+
+ A totalização inclui o voto do Presidente? + +
-
- Resultado da Votação - -
-
+
+ Resultado da Votação + +
+
-
-
- Observações - -
-
+
+
+ Observações + +
+
- + -

- - +

+ + + {% endif %}
{% endblock detail_content %}