Browse Source

Add new event statuses and adjust the calendar status display colors

stable/2.1
Sesostris Vieira 9 years ago
parent
commit
790e316820
  1. 5
      sigi/apps/eventos/models.py
  2. 9
      sigi/apps/eventos/templates/eventos/calendario.html

5
sigi/apps/eventos/models.py

@ -39,8 +39,9 @@ class TipoEvento(models.Model):
class Evento(models.Model): class Evento(models.Model):
STATUS_CHOICES = ( STATUS_CHOICES = (
('P', _(u"Programado")), ('P', _(u"Previsão")),
('A', _(u"Autorizado")), ('A', _(u"A confirmar")),
('O', _(u"Confirmado")),
('R', _(u"Realizado")), ('R', _(u"Realizado")),
('C', _(u"Cancelado")) ('C', _(u"Cancelado"))
) )

9
sigi/apps/eventos/templates/eventos/calendario.html

@ -9,6 +9,13 @@
text-align: center !important; text-align: center !important;
vertical-align: bottom !important; vertical-align: bottom !important;
} }
.status-P { background-color: #ffffb0}
.status-A { background-color: #a6ebff}
.status-O { background-color: #c2ffc2}
.status-R { background-color: #ffdaa6}
.status-C { background-color: #d98f8d}
</style> </style>
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock %}
@ -49,7 +56,7 @@
<td colspan="{{ evento.start }}">&nbsp;</td> <td colspan="{{ evento.start }}">&nbsp;</td>
{% endif %} {% endif %}
<td colspan="{{ evento.duration }}" class="{% if evento.evento.status == 'P' %}active{% endif %}{% if evento.evento.status == 'A' %}success{% endif %}{% if evento.evento.status == 'R' %}info{% endif %}{% if evento.evento.status == 'C' %}danger{% endif %}"> <td colspan="{{ evento.duration }}" class="status-{{ evento.evento.status }}">
<h5><a href="{% url 'admin:eventos_evento_change' evento.evento.pk %}">{{ evento.evento.nome }}</a></h5> <h5><a href="{% url 'admin:eventos_evento_change' evento.evento.pk %}">{{ evento.evento.nome }}</a></h5>
<h6>({{ evento.evento.tipo_evento }})</h6> <h6>({{ evento.evento.tipo_evento }})</h6>
<dl class="dl-horizontal"> <dl class="dl-horizontal">

Loading…
Cancel
Save