Added button to revert part to a given timestamp.

This commit is contained in:
Jan Böhmer 2020-03-01 20:30:23 +01:00
parent 5a5d7b24be
commit 654c5bd59f
4 changed files with 74 additions and 15 deletions

View file

@ -1,5 +1,5 @@
<form method="post" action="{{ url("log_undo") }}" data-delete-form data-title="{% trans %}log.undo.confirm_title{% endtrans %}"
data-message="{% trans %}log.undo.confirm_message{% endtrans %}">>
data-message="{% trans %}log.undo.confirm_message{% endtrans %}">
<input type="hidden" name="redirect_back" value="{{ app.request.uri }}">
<div id="part_list" class="" data-datatable data-settings='{{ datatable_settings(datatable) }}'>
<div class="card-body">

View file

@ -24,7 +24,7 @@
<h3>{{ part.name }}
{# You need edit permission to use the edit button #}
{% if timeTravel is not null %}
<a href="{{ part|entityURL('info') }}"><i title="{% trans %}part.back_to_info{% endtrans %}" class="fas fa-fw fa-undo"></i></a>
<a href="{{ part|entityURL('info') }}"><i title="{% trans %}part.back_to_info{% endtrans %}" class="fas fa-fw fa-arrow-circle-left"></i></a>
{% elseif is_granted('edit', part) %}
<a href="{{ part|entityURL('edit') }}"><i class="fas fa-fw fa-sm fa-edit"></i></a>
{% endif %}