mirror of https://github.com/interlegis/sapl.git
committed by
João Matheus
11 changed files with 309 additions and 9 deletions
@ -0,0 +1,35 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.11.20 on 2019-03-14 18:32 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('protocoloadm', '0017_merge_20190121_1552'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='Anexado', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('data_anexacao', models.DateField(verbose_name='Data Anexação')), |
|||
('data_desanexacao', models.DateField(blank=True, null=True, verbose_name='Data Desanexação')), |
|||
('documento_anexado', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documento_anexado_set', to='protocoloadm.DocumentoAdministrativo', verbose_name='Documento Anexado')), |
|||
('documento_principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documento_principal_set', to='protocoloadm.DocumentoAdministrativo', verbose_name='Documento Principal')), |
|||
], |
|||
options={ |
|||
'verbose_name': 'Anexado', |
|||
'verbose_name_plural': 'Anexados', |
|||
}, |
|||
), |
|||
migrations.AddField( |
|||
model_name='documentoadministrativo', |
|||
name='anexados', |
|||
field=models.ManyToManyField(blank=True, related_name='anexo_de', through='protocoloadm.Anexado', to='protocoloadm.DocumentoAdministrativo'), |
|||
), |
|||
] |
|||
@ -0,0 +1,13 @@ |
|||
{% extends "crud/list.html" %} |
|||
{% load i18n %} |
|||
{% load common_tags %} |
|||
|
|||
{% block more_buttons %} |
|||
|
|||
{% if perms|get_add_perm:view %} |
|||
<a href="{% url 'sapl.protocoloadm:anexado_em_lote' root_pk %}" class="btn btn-outline-primary"> |
|||
{% trans "Adicionar Anexado em Lote" %} |
|||
</a> |
|||
{% endif %} |
|||
|
|||
{% endblock more_buttons %} |
|||
Loading…
Reference in new issue