mirror of https://github.com/interlegis/sapl.git
Edward Ribeiro
9 years ago
10 changed files with 165 additions and 132 deletions
@ -1,62 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
from django.utils.timezone import utc |
|||
import datetime |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('painel', '0001_initial'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='cronometro', |
|||
name='data', |
|||
field=models.DateField(null=True, verbose_name='Data cronômetro', auto_now_add=True), |
|||
), |
|||
migrations.AddField( |
|||
model_name='painel', |
|||
name='data_painel', |
|||
field=models.DateField(default=datetime.datetime(2015, 9, 8, 17, 35, 48, 279510, tzinfo=utc), verbose_name='Data painel', auto_now_add=True), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='cronometro', |
|||
name='reset', |
|||
field=models.PositiveIntegerField(verbose_name='Reiniciar cronômetro'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='cronometro', |
|||
name='start', |
|||
field=models.PositiveIntegerField(verbose_name='Iniciar cronômetro'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='cronometro', |
|||
name='stop', |
|||
field=models.PositiveIntegerField(verbose_name='Parar cronômetro'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='cronometro', |
|||
name='tipo', |
|||
field=models.CharField(choices=[('A', 'Aparte'), ('D', 'Discurso'), ('O', 'Ordem do dia')], verbose_name='Tipo Cronômetro', max_length=1), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='painel', |
|||
name='abrir', |
|||
field=models.PositiveIntegerField(default=0, verbose_name='Abrir painel'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='painel', |
|||
name='fechar', |
|||
field=models.PositiveIntegerField(default=1, verbose_name='Fechar painel'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='painel', |
|||
name='mostrar', |
|||
field=models.CharField(default='C', choices=[('C', 'Completo'), ('P', 'Parlamentares'), ('V', 'Votação'), ('M', 'Mensagem')], max_length=1), |
|||
), |
|||
] |
@ -0,0 +1,27 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('painel', '0001_initial'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RemoveField( |
|||
model_name='painel', |
|||
name='abrir', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='painel', |
|||
name='fechar', |
|||
), |
|||
migrations.AddField( |
|||
model_name='painel', |
|||
name='aberto', |
|||
field=models.BooleanField(verbose_name='Abrir painel', default=False), |
|||
), |
|||
] |
@ -1,27 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
from django.utils.timezone import utc |
|||
import datetime |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('painel', '0002_auto_20150908_1435'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='cronometro', |
|||
name='data', |
|||
field=models.DateField(verbose_name='Data cronômetro', default=datetime.datetime(2015, 9, 8, 17, 44, 1, 708326, tzinfo=utc)), |
|||
preserve_default=False, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='painel', |
|||
name='data_painel', |
|||
field=models.DateField(verbose_name='Data painel'), |
|||
), |
|||
] |
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('painel', '0002_auto_20150908_1818'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='cronometro', |
|||
name='counter', |
|||
field=models.PositiveIntegerField(default=0), |
|||
), |
|||
] |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('painel', '0003_cronometro_counter'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RemoveField( |
|||
model_name='cronometro', |
|||
name='counter', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='cronometro', |
|||
name='reset', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='cronometro', |
|||
name='start', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='cronometro', |
|||
name='stop', |
|||
), |
|||
migrations.AddField( |
|||
model_name='cronometro', |
|||
name='status', |
|||
field=models.CharField(max_length=1, verbose_name='Status do cronômetro', choices=[('I', 'Start'), ('R', 'Reset'), ('S', 'Stop')], default='S'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='cronometro', |
|||
name='time', |
|||
field=models.FloatField(verbose_name='Start time', default=0), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='cronometro', |
|||
name='data_painel', |
|||
field=models.DateField(verbose_name='Data do cronômetro'), |
|||
), |
|||
] |
@ -1,10 +1,24 @@ |
|||
{% extends 'base.html' %} |
|||
{% load i18n %} |
|||
{% block base_content %} |
|||
<form method="post"> |
|||
{% csrf_token %} |
|||
{{ painel.fechar }}<br/> |
|||
<input type="submit" name="start-painel" value="Abrir Painel"> |
|||
<input type="submit" name="stop-painel" value="Fechar Painel"> |
|||
</form> |
|||
|
|||
STATUS: |
|||
{% if painel.aberto %} |
|||
ABERTO |
|||
{% else %} |
|||
FECHADO |
|||
{% endif %} |
|||
<br/> |
|||
<form method="post"> |
|||
{% csrf_token %} |
|||
Tipo de painel: {{ painel.get_mostrar_display }}</br> |
|||
{% for id, value in PAINEL_TYPES %} |
|||
<input type="radio" name="tipo_painel" id="tipo_painel{{ forloop.counter }}" value="{{ id }}" {% if id == painel.mostrar %}checked="checked" {% endif %}> |
|||
<label for="tipo_painel{{ forloop.counter }}">{{ value }}</label><br /> |
|||
{% endfor %} |
|||
</br> |
|||
<input type="submit" name="start-painel" value="Abrir Painel"> |
|||
<input type="submit" name="stop-painel" value="Fechar Painel"> |
|||
<input type="submit" name="save-painel" value="Salvar"> |
|||
</form> |
|||
{% endblock %} |
|||
|
Loading…
Reference in new issue