Browse Source

ajusta botões de ação em TAs

pull/3039/head
Leandro Roberto 5 years ago
parent
commit
d76b058025
  1. 4
      sapl/templates/compilacao/text_edit.html
  2. 12
      sapl/templates/compilacao/textoarticulado_detail.html

4
sapl/templates/compilacao/text_edit.html

@ -16,11 +16,11 @@
{% if perms.compilacao.lock_unlock_textoarticulado and not object.editable_only_by_owners%} {% if perms.compilacao.lock_unlock_textoarticulado and not object.editable_only_by_owners%}
<a href="{% url 'sapl.compilacao:ta_text_edit' object.pk %}?{% if object.editing_locked %}unlock{%else%}lock{% endif %}" class="btn {% if object.editing_locked %}btn-outline-danger{%else%}btn-outline-primary{% endif %}">{% if object.editing_locked %}{% trans 'Desbloquear Edição' %}{%else%}{% trans 'Publicar Texto' %}{% endif %}</a> <a href="{% url 'sapl.compilacao:ta_text_edit' object.pk %}?{% if object.editing_locked %}unlock{%else%}lock{% endif %}" class="btn {% if object.editing_locked %}btn-outline-danger{%else%}btn-outline-primary{% endif %}">{% if object.editing_locked %}{% trans 'Desbloquear Edição' %}{%else%}{% trans 'Publicar Texto' %}{% endif %}</a>
{% endif %} {% endif %}
</div>
<div class="actions btn-group" role="group">
<a href="{% url 'sapl.compilacao:ta_edit' object.pk %}" class="btn btn-outline-primary">{% trans 'Editar Metadados do Texto Articulado' %}</a> <a href="{% url 'sapl.compilacao:ta_edit' object.pk %}" class="btn btn-outline-primary">{% trans 'Editar Metadados do Texto Articulado' %}</a>
{% include 'compilacao/textoarticulado_menu_config.html' %} {% include 'compilacao/textoarticulado_menu_config.html' %}
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock actions %} {% endblock actions %}

12
sapl/templates/compilacao/textoarticulado_detail.html

@ -10,18 +10,22 @@
{% block base_content %} {% block base_content %}
{% block actions %} {% block actions %}
<div class="context-actions justify-content-between mb-4"> <div class="context-actions d-flex justify-content-between mb-4">
<div class="actions btn-group" role="group"> <div class="actions btn-group" role="group">
{% if not object.editing_locked %}
<a class="btn btn-success" href="{% url 'sapl.compilacao:ta_text' object.pk %}">PreView</a> <a class="btn btn-success" href="{% url 'sapl.compilacao:ta_text' object.pk %}">PreView</a>
{% endif %}
{% if perms.compilacao.lock_unlock_textoarticulado and not object.editable_only_by_owners%}
<a href="{% url 'sapl.compilacao:ta_text_edit' object.pk %}?{% if object.editing_locked %}unlock{%else%}lock{% endif %}" class="btn {% if object.editing_locked %}btn-danger{%else%}btn-outline-primary{% endif %}">{% if object.editing_locked %}{% trans 'Desbloquear Edição' %}{%else%}{% trans 'Publicar Texto' %}{% endif %}</a>
{% endif %}
</div>
<div class="actions btn-group" role="group">
{% if perms.compilacao.change_textoarticulado and object|can_use_dynamic_editing:user %} {% if perms.compilacao.change_textoarticulado and object|can_use_dynamic_editing:user %}
<a href="{% url 'sapl.compilacao:ta_edit' object.pk %}" class="btn btn-outline-primary">{% trans 'Editar Metadados do Texto Articulado' %}</a> <a href="{% url 'sapl.compilacao:ta_edit' object.pk %}" class="btn btn-outline-primary">{% trans 'Editar Metadados do Texto Articulado' %}</a>
{% endif %} {% endif %}
{% if object|can_use_dynamic_editing:user %} {% if object|can_use_dynamic_editing:user %}
<a href="{% url 'sapl.compilacao:ta_text_edit' object.pk %}" class="btn btn-outline-primary">{% trans 'Editar Texto' %}</a> <a href="{% url 'sapl.compilacao:ta_text_edit' object.pk %}" class="btn btn-outline-primary">{% trans 'Editar Texto' %}</a>
{% endif %} {% endif %}
{% if perms.compilacao.lock_unlock_textoarticulado and not object.editable_only_by_owners%}
<a href="{% url 'sapl.compilacao:ta_text_edit' object.pk %}?{% if object.editing_locked %}unlock{%else%}lock{% endif %}" class="btn {% if object.editing_locked %}btn-danger{%else%}btn-outline-primary{% endif %}">{% if object.editing_locked %}{% trans 'Desbloquear Edição' %}{%else%}{% trans 'Publicar Texto' %}{% endif %}</a>
{% endif %}
</div> </div>
</div> </div>
{% endblock actions %} {% endblock actions %}

Loading…
Cancel
Save