|
|
@ -3228,11 +3228,13 @@ class VotacaoEmBlocoExpediente(ListView): |
|
|
context_object_name = 'expedientes' |
|
|
context_object_name = 'expedientes' |
|
|
logger = logging.getLogger(__name__) |
|
|
logger = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_queryset(self): |
|
|
def get_queryset(self): |
|
|
kwargs = self.kwargs |
|
|
kwargs = self.kwargs |
|
|
return ExpedienteMateria.objects.filter(sessao_plenaria_id=kwargs['pk'], |
|
|
return ExpedienteMateria.objects.filter(sessao_plenaria_id=kwargs['pk'], |
|
|
resultado='') |
|
|
resultado='') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
def get_context_data(self, **kwargs): |
|
|
context = super(VotacaoEmBlocoExpediente, self).get_context_data(**kwargs) |
|
|
context = super(VotacaoEmBlocoExpediente, self).get_context_data(**kwargs) |
|
|
context['turno_choices'] = Tramitacao.TURNO_CHOICES |
|
|
context['turno_choices'] = Tramitacao.TURNO_CHOICES |
|
|
@ -3250,10 +3252,12 @@ class VotacaoEmBlocoOrdemDia(ListView): |
|
|
context_object_name = 'ordem_dia' |
|
|
context_object_name = 'ordem_dia' |
|
|
parent_field = 'sessao_plenaria' |
|
|
parent_field = 'sessao_plenaria' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_queryset(self): |
|
|
def get_queryset(self): |
|
|
return OrdemDia.objects.filter(sessao_plenaria_id=self.kwargs['pk'], |
|
|
return OrdemDia.objects.filter(sessao_plenaria_id=self.kwargs['pk'], |
|
|
resultado='') |
|
|
resultado='') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
def get_context_data(self, **kwargs): |
|
|
context = super(VotacaoEmBlocoOrdemDia, self).get_context_data(**kwargs) |
|
|
context = super(VotacaoEmBlocoOrdemDia, self).get_context_data(**kwargs) |
|
|
context['turno_choices'] = Tramitacao.TURNO_CHOICES |
|
|
context['turno_choices'] = Tramitacao.TURNO_CHOICES |
|
|
@ -3272,6 +3276,7 @@ class VotacaoEmBlocoSimbolicaView(TemplateView): |
|
|
template_name = 'sessao/votacao/votacao_simbolica_bloco.html' |
|
|
template_name = 'sessao/votacao/votacao_simbolica_bloco.html' |
|
|
logger = logging.getLogger(__name__) |
|
|
logger = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def post(self, request, *args, **kwargs): |
|
|
def post(self, request, *args, **kwargs): |
|
|
|
|
|
|
|
|
if not 'context' in locals(): |
|
|
if not 'context' in locals(): |
|
|
@ -3384,6 +3389,7 @@ class VotacaoEmBlocoSimbolicaView(TemplateView): |
|
|
for tipo in TipoResultadoVotacao.objects.all(): |
|
|
for tipo in TipoResultadoVotacao.objects.all(): |
|
|
yield tipo |
|
|
yield tipo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_success_url(self): |
|
|
def get_success_url(self): |
|
|
if self.request.POST['origem']=='ordem': |
|
|
if self.request.POST['origem']=='ordem': |
|
|
return reverse('sapl.sessao:ordemdia_list', |
|
|
return reverse('sapl.sessao:ordemdia_list', |
|
|
@ -3392,6 +3398,7 @@ class VotacaoEmBlocoSimbolicaView(TemplateView): |
|
|
return reverse('sapl.sessao:expedientemateria_list', |
|
|
return reverse('sapl.sessao:expedientemateria_list', |
|
|
kwargs={'pk': self.kwargs['pk']}) |
|
|
kwargs={'pk': self.kwargs['pk']}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def form_invalid(self, form, context): |
|
|
def form_invalid(self, form, context): |
|
|
|
|
|
|
|
|
errors_tuple = [(form[e].label, form.errors[e]) |
|
|
errors_tuple = [(form[e].label, form.errors[e]) |
|
|
@ -3579,6 +3586,7 @@ class VotacaoEmBlocoNominalView(TemplateView): |
|
|
|
|
|
|
|
|
return self.render_to_response(context) |
|
|
return self.render_to_response(context) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_parlamentares(self): |
|
|
def get_parlamentares(self): |
|
|
|
|
|
|
|
|
#campos hidden ainda não preenchidos |
|
|
#campos hidden ainda não preenchidos |
|
|
@ -3626,6 +3634,7 @@ class VotacaoEmBlocoNominalView(TemplateView): |
|
|
else: |
|
|
else: |
|
|
yield [parlamentar, voto.voto] |
|
|
yield [parlamentar, voto.voto] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_success_url(self): |
|
|
def get_success_url(self): |
|
|
if self.request.POST['origem']=='ordem': |
|
|
if self.request.POST['origem']=='ordem': |
|
|
return reverse('sapl.sessao:ordemdia_list', |
|
|
return reverse('sapl.sessao:ordemdia_list', |
|
|
@ -3634,6 +3643,7 @@ class VotacaoEmBlocoNominalView(TemplateView): |
|
|
return reverse('sapl.sessao:expedientemateria_list', |
|
|
return reverse('sapl.sessao:expedientemateria_list', |
|
|
kwargs={'pk': self.kwargs['pk']}) |
|
|
kwargs={'pk': self.kwargs['pk']}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def form_invalid(self, form, context): |
|
|
def form_invalid(self, form, context): |
|
|
|
|
|
|
|
|
errors_tuple = [(form[e].label, form.errors[e]) |
|
|
errors_tuple = [(form[e].label, form.errors[e]) |
|
|
|