From 1a848f53289d9df3bbd15affdc232de4e1c081cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Rodrigues?= Date: Tue, 18 Jun 2019 17:54:27 -0300 Subject: [PATCH] Fix #2845 (#2846) --- sapl/materia/views.py | 2 +- sapl/templates/materia/materia_detail.html | 36 ------------------- .../materia/materialegislativa_detail.html | 30 ++++++++++++++++ 3 files changed, 31 insertions(+), 37 deletions(-) delete mode 100644 sapl/templates/materia/materia_detail.html diff --git a/sapl/materia/views.py b/sapl/materia/views.py index e1c7f099c..eed4b0bf3 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1681,7 +1681,7 @@ class MateriaLegislativaCrud(Crud): class DetailView(Crud.DetailView): layout_key = 'MateriaLegislativaDetail' - template_name = "materia/materia_detail.html" + template_name = "materia/materialegislativa_detail.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) diff --git a/sapl/templates/materia/materia_detail.html b/sapl/templates/materia/materia_detail.html deleted file mode 100644 index ee1e97c9e..000000000 --- a/sapl/templates/materia/materia_detail.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "crud/detail.html" %} -{% load i18n %} - -{% block detail_content %} - {{ block.super }} - {% if user.is_superuser %} -
- {% if materia.user %} -
-
-

Usuário

-
- -
-
-
- {% endif %} - {% if materia.ip %} -
-
-

IP

-
-
-
{{materia.ip}}
-
-
-
-
- {% endif %} -
- {% endif %} -{% endblock detail_content %} diff --git a/sapl/templates/materia/materialegislativa_detail.html b/sapl/templates/materia/materialegislativa_detail.html index 665e0c497..3396653c2 100644 --- a/sapl/templates/materia/materialegislativa_detail.html +++ b/sapl/templates/materia/materialegislativa_detail.html @@ -43,4 +43,34 @@ {% endfor %} {% endif %} + {% if user.is_superuser %} +
+ {% if materia.user %} +
+
+

Usuário

+
+ +
+
+
+ {% endif %} + {% if materia.ip %} +
+
+

IP

+
+
+
{{materia.ip}}
+
+
+
+
+ {% endif %} +
+ {% endif %} {% endblock detail_content %}