mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-23 20:35:03 +02:00
Show the diff of element edited log entries on detail pages
This commit is contained in:
parent
923e40ed8f
commit
b62fd602f2
8 changed files with 369 additions and 11 deletions
|
@ -46,6 +46,9 @@
|
|||
{% if new_data is not empty %}
|
||||
<th>{% trans %}log.element_changed.data_after{% endtrans %}</th>
|
||||
{% endif %}
|
||||
{% if new_data is not empty and old_data is not empty %} {# Diff column #}
|
||||
<th>{% trans %}log.element_changed.diff{% endtrans %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -76,6 +79,14 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if new_data is not empty and old_data is not empty %}
|
||||
<td>
|
||||
{% if new_data[field] is defined and old_data[field] is defined %}
|
||||
{{ format_log_diff(old_data[field], new_data[field]) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue