diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 4ba3c6255..ccd2c132b 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -1060,7 +1060,8 @@ class ConfiguracoesAppForm(ModelForm): 'cronometro_ordem', 'cronometro_consideracoes', 'mostrar_brasao_painel', - 'receber_recibo_proposicao'] + 'receber_recibo_proposicao', + 'assinatura_ata'] def __init__(self, *args, **kwargs): super(ConfiguracoesAppForm, self).__init__(*args, **kwargs) diff --git a/sapl/base/migrations/0022_appconfig_assinatura_ata.py b/sapl/base/migrations/0022_appconfig_assinatura_ata.py new file mode 100644 index 000000000..7a838ebcc --- /dev/null +++ b/sapl/base/migrations/0022_appconfig_assinatura_ata.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2018-11-01 18:28 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0021_appconfig_esfera_federacao'), + ] + + operations = [ + migrations.AddField( + model_name='appconfig', + name='assinatura_ata', + field=models.CharField(choices=[('M', 'Mesa do dia'), ('P', 'Apenas o presidente do dia'), ('T', 'Todos os presentes')], default='T', max_length=1, verbose_name='Quem deve assina a ata'), + ), + ] diff --git a/sapl/base/models.py b/sapl/base/models.py index afd4160ed..9a0fedef1 100644 --- a/sapl/base/models.py +++ b/sapl/base/models.py @@ -21,6 +21,12 @@ ESFERA_FEDERACAO_CHOICES = (('M', _('Municipal')), ('F', _('Federal')), ) +ASSINATURA_ATA_CHOICES = ( + ('M', _('Mesa do dia')), + ('P', _('Apenas o presidente do dia')), + ('T', _('Todos os presentes')), +) + @reversion.register() class CasaLegislativa(models.Model): @@ -111,6 +117,10 @@ class AppConfig(models.Model): verbose_name=_('Regra de incorporação de proposições e protocolo'), max_length=1, choices=POLITICA_PROTOCOLO_CHOICES, default='O') + assinatura_ata = models.CharField( + verbose_name=_('Quem deve assina a ata'), + max_length=1, choices=ASSINATURA_ATA_CHOICES, default='T') + cronometro_discurso = models.TimeField( verbose_name=_('Cronômetro do Discurso'), blank=True, diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 3c1da0380..365a4cbe0 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -1415,9 +1415,25 @@ class ResumoView(DetailView): sessao_plenaria_id=self.object.id ).order_by('parlamentar__nome_parlamentar') + parlamentares_mesa_dia = [m['parlamentar'] for m in context['mesa']] + # composicao_mesa = ComposicaoMesa.objects.filter(sessao_legislativa=sessao) + + for m in context['mesa']: + if m['cargo'].descricao == 'Presidente': + presidente_dia = [m['parlamentar']] + break + parlamentares_ordem = [p.parlamentar for p in presencas] context.update({'presenca_ordem': parlamentares_ordem}) + + config_assinatura_ata = AppsAppConfig.objects.first().assinatura_ata + if config_assinatura_ata == 'T': + context.update({'assinatura_presentes': parlamentares_ordem}) + elif config_assinatura_ata == 'M': + context.update({'assinatura_presentes': parlamentares_mesa_dia}) + elif config_assinatura_ata == 'P': + context.update({'assinatura_presentes': presidente_dia}) # ===================================================================== # Matérias Ordem do Dia diff --git a/sapl/templates/base/layouts.yaml b/sapl/templates/base/layouts.yaml index 3f7941d64..ef1e53d2a 100644 --- a/sapl/templates/base/layouts.yaml +++ b/sapl/templates/base/layouts.yaml @@ -23,6 +23,9 @@ AppConfig: {% trans 'Textos Articulados' %}: - texto_articulado_proposicao texto_articulado_materia texto_articulado_norma + {% trans 'Assinaturas' %}: + - assinatura_ata + {% trans 'Cronômetros do Painel' %}: - cronometro_discurso cronometro_aparte cronometro_ordem cronometro_consideracoes diff --git a/sapl/templates/sessao/blocos_ata/assinaturas.html b/sapl/templates/sessao/blocos_ata/assinaturas.html index 8b412cdc3..c3ef83904 100644 --- a/sapl/templates/sessao/blocos_ata/assinaturas.html +++ b/sapl/templates/sessao/blocos_ata/assinaturas.html @@ -4,8 +4,11 @@