From fdba0bf308be84e1a5395313bb739ad8d9fa74b2 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Tue, 4 Oct 2016 11:02:41 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20campo=20de=20observa=C3=A7=C3=A3o=20?= =?UTF-8?q?ao=20orador?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0029_auto_20161004_1101.py | 35 +++++++++++++++++++ sapl/sessao/models.py | 6 ++-- sapl/templates/sessao/layouts.yaml | 6 ++-- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 sapl/sessao/migrations/0029_auto_20161004_1101.py diff --git a/sapl/sessao/migrations/0029_auto_20161004_1101.py b/sapl/sessao/migrations/0029_auto_20161004_1101.py new file mode 100644 index 000000000..070ef640c --- /dev/null +++ b/sapl/sessao/migrations/0029_auto_20161004_1101.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-10-04 14:01 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0028_auto_20161004_0927'), + ] + + operations = [ + migrations.AddField( + model_name='orador', + name='observacao', + field=models.CharField(blank=True, max_length=150, verbose_name='Observação'), + ), + migrations.AddField( + model_name='oradorexpediente', + name='observacao', + field=models.CharField(blank=True, max_length=150, verbose_name='Observação'), + ), + migrations.AlterField( + model_name='orador', + name='url_discurso', + field=models.URLField(blank=True, max_length=150, verbose_name='URL Vídeo'), + ), + migrations.AlterField( + model_name='oradorexpediente', + name='url_discurso', + field=models.URLField(blank=True, max_length=150, verbose_name='URL Vídeo'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index 9979d1c2e..614f3ec57 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -213,8 +213,10 @@ class AbstractOrador(models.Model): # Oradores parlamentar = models.ForeignKey(Parlamentar, verbose_name=_('Parlamentar')) numero_ordem = models.PositiveIntegerField( verbose_name=_('Ordem de pronunciamento')) - url_discurso = models.CharField( - max_length=150, blank=True, verbose_name=_('URL Vídeo ou Observação')) + url_discurso = models.URLField( + max_length=150, blank=True, verbose_name=_('URL Vídeo')) + observacao = models.CharField( + max_length=150, blank=True, verbose_name=_('Observação')) class Meta: abstract = True diff --git a/sapl/templates/sessao/layouts.yaml b/sapl/templates/sessao/layouts.yaml index 18044db77..a8f80ab68 100644 --- a/sapl/templates/sessao/layouts.yaml +++ b/sapl/templates/sessao/layouts.yaml @@ -28,11 +28,13 @@ RegistroVotacao: Orador: {% trans 'Orador das Explicações Pessoais' %}: - - numero_ordem parlamentar url_discurso + - numero_ordem parlamentar + - url_discurso observacao OradorExpediente: {% trans 'Orador do Expediente' %}: - - numero_ordem parlamentar url_discurso + - numero_ordem parlamentar + - url_discurso observacao ExpedienteMateria: {% trans 'Matéria do Expediente' %}: