From 9a687c73f4f6e1867a70a83eccf0ad5053e7bd18 Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Thu, 15 Sep 2016 17:01:09 -0300 Subject: [PATCH] =?UTF-8?q?Retira=20actions=20de=20inser=C3=A7=C3=A3o=20em?= =?UTF-8?q?=20disp=20de=20altera=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Em dispositivos alterados, enquanto editados nos Textos Alteradores, com intuito de interface mais objetiva, os menus de possíveis inserções posteriores e internas não deve ser exibido. --- sapl/compilacao/views.py | 20 ++++++++++++-------- sapl/static/styles/compilacao.scss | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py index 5938c4f68..70160c06a 100644 --- a/sapl/compilacao/views.py +++ b/sapl/compilacao/views.py @@ -2220,18 +2220,22 @@ class DispositivoDinamicEditView( self.object = Dispositivo.objects.get( pk=self.kwargs['dispositivo_id']) + ta_id = self.kwargs['ta_id'] + context = {} context['object'] = self.object - context['allowed_inserts'] = self.allowed_inserts() - if 'perfil_pk' in request.GET: - self.set_perfil_in_session( - request, request.GET['perfil_pk']) - elif 'perfil_estrutural' not in request.session: - self.set_perfil_in_session(request=request) + if ta_id == str(self.object.ta_id): + context['allowed_inserts'] = self.allowed_inserts() + + if 'perfil_pk' in request.GET: + self.set_perfil_in_session( + request, request.GET['perfil_pk']) + elif 'perfil_estrutural' not in request.session: + self.set_perfil_in_session(request=request) - context['perfil_estrutural_list' - ] = PerfilEstruturalTextoArticulado.objects.all() + context['perfil_estrutural_list' + ] = PerfilEstruturalTextoArticulado.objects.all() return self.render_to_response(context) diff --git a/sapl/static/styles/compilacao.scss b/sapl/static/styles/compilacao.scss index 792a21bd9..148244c0b 100644 --- a/sapl/static/styles/compilacao.scss +++ b/sapl/static/styles/compilacao.scss @@ -528,8 +528,8 @@ a:link:after, a:visited:after { display: block; & > .dpt-actions-fixed { position: absolute; - right: -0.5em; - top: -0.5em; + right: -0.8em; + top: -0.8em; z-index: 3; opacity: 0;