Show the diff of element edited log entries on detail pages

This commit is contained in:
Jan Böhmer 2023-05-14 23:08:14 +02:00
parent 923e40ed8f
commit b62fd602f2
8 changed files with 369 additions and 11 deletions

View file

@ -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>