mirror of https://github.com/interlegis/sapl.git
Browse Source
* Fix 2720 - Adiciona usuarios em tramitacoes * Corrige os testes * adicionar visualizacao para superusers * adiciona ip e user para docadm * corrige migrations * Adiciona tela usuario em DocAdm e correcoes de testes * Apenas atualiza o usuario e ip na edicao se houve alteracaopull/2811/head
Cesar Augusto de Carvalho
6 years ago
committed by
Cesar Carvalho
12 changed files with 270 additions and 33 deletions
@ -0,0 +1,28 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.20 on 2019-04-17 15:12 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.conf import settings |
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
||||
|
('materia', '0045_auto_20190415_1050'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AddField( |
||||
|
model_name='tramitacao', |
||||
|
name='ip', |
||||
|
field=models.CharField(blank=True, default='', max_length=30, verbose_name='IP'), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='tramitacao', |
||||
|
name='user', |
||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Usuário'), |
||||
|
), |
||||
|
] |
@ -0,0 +1,16 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.20 on 2019-04-26 11:28 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('materia', '0046_auto_20190417_1212'), |
||||
|
('materia', '0047_auto_20190417_1432'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
] |
@ -0,0 +1,28 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.20 on 2019-04-26 11:33 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.conf import settings |
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
||||
|
('protocoloadm', '0018_auto_20190314_1532'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AddField( |
||||
|
model_name='tramitacaoadministrativo', |
||||
|
name='ip', |
||||
|
field=models.CharField(blank=True, default='', max_length=30, verbose_name='IP'), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='tramitacaoadministrativo', |
||||
|
name='user', |
||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Usuário'), |
||||
|
), |
||||
|
] |
@ -0,0 +1,38 @@ |
|||||
|
{% extends "crud/detail.html" %} |
||||
|
{% load i18n %} |
||||
|
|
||||
|
{% block detail_content %} |
||||
|
{{ block.super }} |
||||
|
{% if user.is_superuser %} |
||||
|
<div class="row"> |
||||
|
{% if tramitacao.user %} |
||||
|
<div class="col-sm-6"> |
||||
|
<div id="div_id_user" class="form-group"> |
||||
|
<p class="control-label">Usuário</p> |
||||
|
<div class="controls"> |
||||
|
<div class="form-control-static"> |
||||
|
<div class="dont-break-out"> |
||||
|
<a href="{% url 'sapl.base:user_edit' user.pk %}">{{tramitacao.user}}</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
{% endif %} |
||||
|
{% if tramitacao.ip %} |
||||
|
<div class="col-sm-6"> |
||||
|
<div id="div_ip_user" class="form-group"> |
||||
|
<p class="control-label">IP</p> |
||||
|
<div class="controls"> |
||||
|
<div class="form-control-static"> |
||||
|
<div class="dont-break-out"> |
||||
|
{{tramitacao.ip}} |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
{% endif %} |
||||
|
</div> |
||||
|
{% endif %} |
||||
|
{% endblock detail_content %} |
Loading…
Reference in new issue