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'%}

+
+
{{object.tipo}}
+
+
+
+
+
+

{%field_verbose_name object 'autor'%}

+
+
{{object.autor}}
+
+
+
+
+
+
+
+

{%field_verbose_name object 'nome'%}

+
+
{{object.nome}}
+
+
+
+
+
+

{%field_verbose_name object 'data'%}

+
+
{{object.data}}
+
+
+
+
+
+
+
+

{%field_verbose_name object 'arquivo'%}

+
+
+ {% if object.arquivo %} + {{object.arquivo.name}} + {% endif %} +
+
+
+
+
+
+
+
+

{%field_verbose_name object 'restrito'%}

+
+
{% if object.restrito %}Sim{% else %}Não{% endif %}
+
+
+
+
+
+

{%field_verbose_name object 'justificativa_restricao'%}

+
+
{{object.justificativa_restricao}}
+
+
+
+
+ {% else %} +

+ + {% endif %} +{% endblock detail_content %} + diff --git a/sapl/templates/materia/documentoacessorio_list.html b/sapl/templates/materia/documentoacessorio_list.html index 9a73a5d5a..c9d1b6b05 100644 --- a/sapl/templates/materia/documentoacessorio_list.html +++ b/sapl/templates/materia/documentoacessorio_list.html @@ -11,9 +11,6 @@ {% for name in headers %} -{% comment %} -{% if name != 'Restrito' and name != 'Justificativa de Restrição' %} -{% endcomment %} {% if view.ordered_list %} @@ -30,9 +27,6 @@ {{ name }} {% endif %} -{% comment %} -{% endif %} -{% endcomment %} {% endfor %} diff --git a/sapl/templates/protocoloadm/documentoacessorioadministrativo_detail.html b/sapl/templates/protocoloadm/documentoacessorioadministrativo_detail.html new file mode 100644 index 000000000..7557a4e77 --- /dev/null +++ b/sapl/templates/protocoloadm/documentoacessorioadministrativo_detail.html @@ -0,0 +1,95 @@ +{% extends "crud/detail_detail.html" %} +{% load i18n common_tags %} +{% load tz %} + +{% block detail_content %} + + {% if not object.restrito and not doc_adm_restrito or 'protocoloadm.change_documentoacessorioadministrativo' in user.get_all_permissions %} +
+
+
+

{%field_verbose_name object 'tipo'%}

+
+
{{object.tipo}}
+
+
+
+
+
+

{%field_verbose_name object 'autor'%}

+
+
{{object.autor}}
+
+
+
+
+
+
+
+

{%field_verbose_name object 'nome'%}

+
+
{{object.nome}}
+
+
+
+
+
+

{%field_verbose_name object 'data'%}

+
+
{{object.data}}
+
+
+
+
+
+
+ +
+
+
+
+
+

{%field_verbose_name object 'assunto'%}

+
+
{{object.assunto}}
+
+
+
+
+
+
+
+

{%field_verbose_name object 'restrito'%}

+
+
{% if object.restrito %}Sim{% else %}Não{% endif %}
+
+
+
+
+
+

{%field_verbose_name object 'justificativa_restricao'%}

+
+
{{object.justificativa_restricao}}
+
+
+
+
+ {% else %} +

+ + {% endif %} +{% endblock detail_content %} diff --git a/sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html b/sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html new file mode 100644 index 000000000..9bb6a878f --- /dev/null +++ b/sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html @@ -0,0 +1,63 @@ +{% extends "crud/list.html" %} +{% load i18n common_tags crispy_forms_tags%} + +{% block container_table_list %} + {% if not rows %} +

{{ NO_ENTRIES_MSG }}

+ {% else %} +
+
{% blocktrans with verbose_name_plural=view.verbose_name_plural %}Total de {{ verbose_name_plural }}: {{count}}{% endblocktrans %}
+ + + + {% for name in headers %} + + {% endfor %} + + + + {% for doc in object_list %} + + {% if not doc.restrito or 'protocoloadm.change_documentoacessorioadministrativo' in request.user.get_all_permissions %} + + + + + + {% else %} + + {% endif %} + + {% endfor %} + + +
+ {% endif %} +{% endblock container_table_list %}