From dccf957db4a5c1dbb576d73d37b082d56d4f2efa Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Tue, 20 Jun 2017 11:44:59 -0300 Subject: [PATCH] =?UTF-8?q?Insere=20refresh=20autom=C3=A1tico=20no=20voto?= =?UTF-8?q?=20nominal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/painel/urls.py | 2 +- sapl/painel/views.py | 5 +++++ sapl/templates/painel/voto_nominal.html | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sapl/painel/urls.py b/sapl/painel/urls.py index f0054bd3c..86cf20277 100644 --- a/sapl/painel/urls.py +++ b/sapl/painel/urls.py @@ -21,5 +21,5 @@ urlpatterns = [ # url(r'^painel/cronometro$', include(CronometroPainelCrud.get_urls())), url(r'^voto-individual/$', votante_view, - name="voto_individual"), + name='voto_individual'), ] diff --git a/sapl/painel/views.py b/sapl/painel/views.py index 5befd0367..7df2cf176 100644 --- a/sapl/painel/views.py +++ b/sapl/painel/views.py @@ -33,6 +33,11 @@ def check_permission(user): def votacao_aberta(request): + ''' + Função que verifica se há somente 1 uma matéria aberta ou + nenhuma. É utilizada como uma função auxiliar para a view + votante_view. + ''' votacoes_abertas = SessaoPlenaria.objects.filter( Q(ordemdia__votacao_aberta=True) | Q(expedientemateria__votacao_aberta=True)).distinct() diff --git a/sapl/templates/painel/voto_nominal.html b/sapl/templates/painel/voto_nominal.html index fd02b58c7..29b3adb60 100644 --- a/sapl/templates/painel/voto_nominal.html +++ b/sapl/templates/painel/voto_nominal.html @@ -78,3 +78,11 @@

{{error_message}}

{% endif %} + + \ No newline at end of file