mirror of https://github.com/interlegis/sapl.git
9 changed files with 179 additions and 10 deletions
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.8 on 2018-12-17 18:44 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('norma', '0016_tipovinculonormajuridica_revoga_integramente'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='NormaEstatisticas', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('usuario', models.CharField(max_length=50)), |
||||
|
('horario_acesso', models.DateTimeField(auto_now=True, null=True)), |
||||
|
('norma', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='norma.NormaJuridica')), |
||||
|
], |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,53 @@ |
|||||
|
{% extends "crud/list.html" %} |
||||
|
{% load i18n %} |
||||
|
{% load crispy_forms_tags %} |
||||
|
|
||||
|
{% block base_content %} |
||||
|
{% if not show_results %} |
||||
|
{% crispy filter.form %} |
||||
|
{% endif %} |
||||
|
{% if show_results %} |
||||
|
<div class="actions btn-group pull-right" role="group"> |
||||
|
<a href="{% url 'sapl.base:estatisticas_acesso' %}" class="btn btn-default">{% trans 'Fazer nova pesquisa' %}</a> |
||||
|
</div> |
||||
|
<br /><br /><br /><br /> |
||||
|
<b>PARÂMETROS DE PESQUISA:<br /></b> |
||||
|
 Ano: {{ ano }} <br /> |
||||
|
<br/> |
||||
|
{% if normas_mes|length == 0 %} |
||||
|
<br> |
||||
|
<h3>{% trans 'Não foi encontrada nenhuma norma com os parâmetros buscados.'%}</h3> |
||||
|
{% endif %} |
||||
|
{% for mes, normas in normas_mes.items %} |
||||
|
<div style="overflow:auto; "> |
||||
|
<table class="table table-bordered table-hover" style="margin-bottom: 0px;"> |
||||
|
<thead class="thead-default"> |
||||
|
<tr> |
||||
|
<th><h3 style="text-align:center;">Mês: {{ mes }}</h3></th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
</table> |
||||
|
<table class="table table-bordered table-hover" style="width:100%; margin-bottom: 30px;"> |
||||
|
<thead class="thead-default" > |
||||
|
<tr class="active"> |
||||
|
<th>Matéria</th> |
||||
|
<th>Norma</th> |
||||
|
<th>Acessos</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
{% for n in normas %} |
||||
|
<tr> |
||||
|
<td><a href="{% url 'sapl.norma:normajuridica_detail' n.0.pk %}"> |
||||
|
{{n.0.tipo.descricao}} - {{n.0.tipo.sigla}} {{n.0.numero}}/{{n.0.ano}} |
||||
|
</a></td> |
||||
|
<td>{{n.0.ementa}}<br>{{n.0.observacao}}</td> |
||||
|
<td>{{n.1}}</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
{% endblock base_content %} |
||||
Loading…
Reference in new issue