diff --git a/sapl/materia/migrations/0082_auto_20220929_1450.py b/sapl/materia/migrations/0082_auto_20220929_1450.py new file mode 100644 index 000000000..fc613db59 --- /dev/null +++ b/sapl/materia/migrations/0082_auto_20220929_1450.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.28 on 2022-09-29 17:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0081_auto_20220321_0934'), + ] + + operations = [ + migrations.AddField( + model_name='documentoacessorio', + name='justificativa_restricao', + field=models.TextField(blank=True, verbose_name='Justificativa de Restrição'), + ), + migrations.AddField( + model_name='documentoacessorio', + name='restrito', + field=models.BooleanField(blank=True, default=False, verbose_name='Restrito'), + ), + ] diff --git a/sapl/protocoloadm/migrations/0044_auto_20220923_0946.py b/sapl/protocoloadm/migrations/0044_auto_20220923_0946.py new file mode 100644 index 000000000..75ad59f00 --- /dev/null +++ b/sapl/protocoloadm/migrations/0044_auto_20220923_0946.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.28 on 2022-09-23 12:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('protocoloadm', '0043_auto_20220919_1705'), + ] + + operations = [ + migrations.AddField( + model_name='documentoacessorioadministrativo', + name='justificativa_restricao', + field=models.TextField(blank=True, verbose_name='Justificativa de Restrição'), + ), + migrations.AddField( + model_name='documentoacessorioadministrativo', + name='restrito', + field=models.BooleanField(blank=True, default=False, verbose_name='Restrito'), + ), + ] diff --git a/sapl/templates/materia/documentoacessorio_detail.html b/sapl/templates/materia/documentoacessorio_detail.html new file mode 100644 index 000000000..1a20cc1cc --- /dev/null +++ b/sapl/templates/materia/documentoacessorio_detail.html @@ -0,0 +1,84 @@ +{% extends "crud/detail_detail.html" %} +{% load i18n common_tags %} +{% load tz %} + +{% block detail_content %} + + {% if not object.restrito or 'materia.change_documentoacessorio' in user.get_all_permissions %} +
{%field_verbose_name object 'tipo'%}
+{%field_verbose_name object 'autor'%}
+{%field_verbose_name object 'nome'%}
+{%field_verbose_name object 'data'%}
+{%field_verbose_name object 'arquivo'%}
+{%field_verbose_name object 'restrito'%}
+{%field_verbose_name object 'justificativa_restricao'%}
+{%field_verbose_name object 'tipo'%}
+{%field_verbose_name object 'autor'%}
+{%field_verbose_name object 'nome'%}
+{%field_verbose_name object 'data'%}
+{%field_verbose_name object 'arquivo'%}
+{%field_verbose_name object 'assunto'%}
+{%field_verbose_name object 'restrito'%}
+{%field_verbose_name object 'justificativa_restricao'%}
+{{ NO_ENTRIES_MSG }}
+ {% else %} ++ {% if view.ordered_list %} + + {{ name }} + {% if 'o' in request.GET or not view.ordering %} + {% if 'o' not in request.GET and forloop.counter == 1 or 'o' in request.GET and forloop.counter|safe == request.GET.o %} + + {% elif 'o' in request.GET and forloop.counter == request.GET.o|str2intabs %} + + {% endif %} + {% endif %} + + {% else %} + {{ name }} + {% endif %} + | + {% endfor %} +|||||||||
---|---|---|---|---|---|---|---|---|---|
+ {{ doc.nome }} + | ++ {{ doc.tipo }} + | ++ {% if doc.data %}{{ doc.data }}{% endif %} + | ++ {% if doc.autor %}{{ doc.autor }}{% endif %} + | ++ {% if doc.assunto %}{{ doc.assunto }}{% endif %} + | + {% else %} ++ Documento Restrito{{ doc.justificativa_restricao|safe }} + | + {% endif %} +