mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
4.4 KiB
78 lines
4.4 KiB
{% load i18n %}
|
|
|
|
<div class="d-flex justify-content-between">
|
|
|
|
<div class="btn-toolbar" role="toolbar" >
|
|
<div class="btn-group dropdown mr-1 btn-group-sm" role="group">
|
|
{% if object.dispositivo_subsequente == None %}
|
|
{% for inserts in allowed_inserts %}
|
|
{% if inserts.itens %}
|
|
<div class="btn-group btn-group-sm mb-2 btn-group-inserts" role="group">
|
|
<button type="button" class="btn btn-success btn-sm {% if forloop.last %}radius-right{%endif%}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
{{inserts.icone|safe}}<span>{{inserts.tipo_insert}}</span>
|
|
</button>
|
|
<ul class="dropdown-menu btn-group-sm dropdown-menu-left">
|
|
<div class="arrow top"></div>
|
|
{% for item in inserts.itens %}
|
|
<li><a class="btn-inserts btn-action " action="{{inserts.action}}" pk="{{item.dispositivo_base}}" variacao="{{item.variacao}}" tipo_pk="{{item.tipo_pk}}">{{item.provavel|safe}}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="btn-group mr-1 btn-group-sm mb-2" role="group">
|
|
{% if not object.dispositivo_subsequente %}
|
|
{% for perfil in perfil_estrutural_list%}
|
|
<button type="button" class="btn-action btn-perfis btn btn-xs {%if request.session.perfil_estrutural == perfil.pk %}btn-primary{%else%}btn-outline-primary{%endif%}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" pk="{{object.pk}}" perfil_pk="{{perfil.pk}}" action="json_get_perfis" title="{{perfil.nome}}">
|
|
{{perfil.sigla}}
|
|
</button>
|
|
{% endfor %}
|
|
{%endif%}
|
|
</div>
|
|
|
|
{% if perms.compilacao.change_dispositivo_de_vigencia_global %}
|
|
{% if not object.ta_publicado and not object.dispositivo_subsequente and not object.tipo_dispositivo.dispositivo_de_alteracao%}
|
|
<div class="btn-group mr-1 btn-group-sm mb-2" role="group">
|
|
<button type="button" class="btn-action btn btn-xs {% if object.pk == object.dispositivo_vigencia_id %}btn-primary{%else%}btn-outline-primary{%endif%}" pk="{{object.pk}}" action="json_set_dvt" title="{% if object.pk == object.dispositivo_vigencia_id %}{% trans 'Dispositivo de Vigência Atual'%}{%else%}{% trans 'Tornar este o Dispositivo de Vigência de todo o Texto Articulado.'%}{%endif%}">
|
|
DVt
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="btn-toolbar" role="toolbar" >
|
|
{% if perms.compilacao.change_dispositivo_registros_compilacao %}
|
|
{% if object.tipo_dispositivo.dispositivo_de_articulacao and object.tipo_dispositivo.dispositivo_de_alteracao %}
|
|
<div class="btn-group mr-1 btn-group-sm mb-2" role="group">
|
|
<button type="button" class="btn btn-outline-primary btn-sm btn-compila" pk="{{object.pk}}" action="get_form_revogacao" title="{% trans "Registar Revogação" %}">
|
|
{% trans "Revogação" %}
|
|
</button>
|
|
<button type="button" class="btn btn-outline-primary btn-sm btn-compila" pk="{{object.pk}}" action="get_form_alteracao" title="{% trans "Registar Alteração" %}">
|
|
{% trans "Alteração" %}
|
|
</button>
|
|
<button type="button" class="btn btn-outline-primary btn-sm btn-compila" pk="{{object.pk}}" action="get_form_inclusao" title="{% trans "Registar Inclusão" %}">
|
|
{% trans "Inclusão" %}
|
|
</button>
|
|
</div>
|
|
{%endif%}
|
|
{% endif %}
|
|
|
|
<div class="btn-group btn-group-sm mb-2 " role="group">
|
|
<button type="button" class="btn btn-outline-primary btn-sm radius-right" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
<i class="fa fa-edit fa-lg"></i>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-right btns-tipos-editor">
|
|
<li><a href="" class="btn-editor-type" editortype="construct">Construtor</a></li>
|
|
<li><a href="" class="btn-editor-type" editortype="textarea">Editor Simples</a></li>
|
|
<li><a href="" class="btn-editor-type" editortype="tinymce">Editor Tinymce</a></li>
|
|
{% if perms.compilacao.change_dispositivo_edicao_avancada %}
|
|
<li><a class="btn-editor-avancado" href="{% url 'sapl.compilacao:dispositivo_edit' object.ta_id object.pk %}" >Editor Avançado</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|