Browse Source

Improve dropdown info in Servicos SEIT dashboard display

producao
Sesostris Vieira 10 years ago
parent
commit
8ccc793a43
  1. 2
      sigi/context_processors.py
  2. 8
      templates/snippets/modules/charts-convenios.html

2
sigi/context_processors.py

@ -167,7 +167,7 @@ def busca_informacoes_seit():
for tipo_servico in TipoServico.objects.all(): for tipo_servico in TipoServico.objects.all():
por_mes = [] por_mes = []
for mes in range(1,13): for mes in range(1,13):
por_mes.append({'mes': '%s/%s' % (mes,datetime.date.today().year), por_mes.append({'mes': '%02d/%s' % (mes,datetime.date.today().year),
'total': tipo_servico.servico_set.filter(data_desativacao=None, data_ativacao__year=mes_atual.year, data_ativacao__month=mes).count()}) 'total': tipo_servico.servico_set.filter(data_desativacao=None, data_ativacao__year=mes_atual.year, data_ativacao__month=mes).count()})
result.append( result.append(

8
templates/snippets/modules/charts-convenios.html

@ -65,12 +65,12 @@
<th>{{ servico.novos_mes_atual }}</th> <th>{{ servico.novos_mes_atual }}</th>
{% else %} {% else %}
<th class="dropdown"> <th class="dropdown">
<span id="ddm-{{ servico.nome }}" data-toggle="dropdown"> <a id="ddm-{{ servico.nome }}" data-toggle="dropdown" href="#">
{{ servico.nome }} {{ servico.nome }}
</span> </a>
<table class="dropdown-menu" role="menu" aria-labelledby="ddm-{{ servico.nome }}"> <table class="table table-condensed numeros servicos dropdown-menu" role="menu" aria-labelledby="ddm-{{ servico.nome }}">
{% for mes in servico.novos_por_mes %} {% for mes in servico.novos_por_mes %}
<tr role="presentation"><th role="menuitem" tabindex="-1" href="#">{{ mes.mes }}</th><td>{{ mes.total }}</td></tr> <tr><th>{{ mes.mes }}</th><td>{{ mes.total }}</td></tr>
{% endfor %} {% endfor %}
</table> </table>
</th> </th>

Loading…
Cancel
Save