mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-09 18:04:33 +02:00
Show element history on part info page in history tab.
This commit is contained in:
parent
fff1864a68
commit
c14d6d91ff
12 changed files with 331 additions and 26 deletions
3
templates/Parts/info/_history.html.twig
Normal file
3
templates/Parts/info/_history.html.twig
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div class="mt-2">
|
||||
{% include "Parts/lists/_parts_list.html.twig" %}
|
||||
</div>
|
|
@ -23,7 +23,9 @@
|
|||
</h5>
|
||||
<h3>{{ part.name }}
|
||||
{# You need edit permission to use the edit button #}
|
||||
{% if is_granted('edit', part) %}
|
||||
{% 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>
|
||||
{% elseif is_granted('edit', part) %}
|
||||
<a href="{{ part|entityURL('edit') }}"><i class="fas fa-fw fa-sm fa-edit"></i></a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
|
||||
{% if timeTravel is not null %}
|
||||
<b class="mb-2">{% trans with {'%timestamp%': timeTravel|format_datetime('short')} %}part.info.timetravel_hint{% endtrans %}</b>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-3">
|
||||
<span class="text-muted" title="{% trans %}lastModified{% endtrans %}">
|
||||
<i class="fas fa-history fa-fw"></i> {{ helper.date_user_combination(part, true) }}
|
||||
|
|
|
@ -114,13 +114,11 @@
|
|||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="history" role="tabpanel" aria-labelledby="history-tab">
|
||||
TODO
|
||||
{% include "Parts/info/_history.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tools" role="tabpanel" aria-labelledby="tools-tab">
|
||||
|
||||
{% include "Parts/info/_tools.html.twig" %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="extended_info" role="tabpanel" aria-labelledby="extended_info-tab">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue