diff --git a/sapl/protocoloadm/models.py b/sapl/protocoloadm/models.py index e5dd9e441..3d532a2d0 100644 --- a/sapl/protocoloadm/models.py +++ b/sapl/protocoloadm/models.py @@ -220,7 +220,7 @@ class DocumentoAdministrativo(models.Model): MateriaLegislativa, blank=True, through='VinculoDocAdminMateria', - related_name='docadmsvinculados', + related_name='docadmvinculados', through_fields=( 'documento', 'materia' @@ -474,7 +474,7 @@ class VinculoDocAdminMateria(models.Model): ordering = ('id',) def __str__(self): - return _(f'Vinculo: {self.documento} - {self.materia}') + return f'Vinculo: {self.documento} - {self.materia}' @reversion.register() diff --git a/sapl/templates/materia/materialegislativa_detail.html b/sapl/templates/materia/materialegislativa_detail.html index 61568608a..13c7daae9 100644 --- a/sapl/templates/materia/materialegislativa_detail.html +++ b/sapl/templates/materia/materialegislativa_detail.html @@ -1,6 +1,5 @@ {% extends "crud/detail.html" %} -{% load i18n %} -{% load tz %} +{% load i18n tz common_tags %} {% block sub_actions %} {{ block.super }} @@ -48,6 +47,37 @@ {{ object.normajuridica_set.last }} {% endif %} + + {% if object.docadmvinculados.all.exists %} + {% if "documentos_administrativos"|get_config_attr == 'O' or "documentos_administrativos"|get_config_attr == 'R' and not user.is_anonymous %} +
Documentos Administrativos Públicos Vinculados a Matéria
+Audiência(s) Pública(s)
Matérias Legislativas Vinculadas
+