Add the data after the change to a element edited log entry, so you can easily view the changes in log detail pages

This commit is contained in:
Jan Böhmer 2023-05-14 21:41:00 +02:00
parent 3c724a227a
commit 923e40ed8f
14 changed files with 136 additions and 22 deletions

View file

@ -22,12 +22,19 @@
{% endif %}
{# For log entries, where we know the old data, this is the last exectuted assignment #}
{% if attribute(entry, 'oldDataInformations') is defined and entry.oldDataInformations %}
{% if attribute(entry, 'oldDataInformation') is defined and entry.oldDataInformation %}
{# We have to use the keys of oldData here, as changedFields might not be available #}
{% set fields = entry.oldData | keys %}
{% set old_data = entry.oldData %}
{% endif %}
{# For log entries, where we have new data, we define it #}
{% if attribute(entry, 'newDataInformation') is defined and entry.newDataInformation %}
{# We have to use the keys of oldData here, as changedFields might not be available #}
{% set fields = entry.newData | keys %}
{% set new_data = entry.newData %}
{% endif %}
{% if fields is not empty %}
<table class="table table-hover table-striped table-sm table-bordered mt-2">
<thead>