{% import '@DHDoctrineAudit/Audit/helpers/bootstrap.html.twig' as bootstrap %} {% import '@DHDoctrineAudit/Audit/helpers/helper.html.twig' as helper %}
{{ bootstrap.icon_type(entry.type) }}

{{ helper.humanize(entity, entry) }}

{% if entry.transaction_hash is not empty %}  {{ entry.transaction_hash }} {% endif %}
{{ bootstrap.badge(entry.type, bootstrap.label_type(entry.type)) }}
{% if entry.type in ['insert', 'update'] %} {% set diffs = entry.diffs|json_decode(true) %} {% for key, values in diffs %} {% endfor %}
{% trans %}audit.audit_details.property{% endtrans %} {% trans %}audit.audit_details.old_value{% endtrans %} {% trans %}audit.audit_details.new_value{% endtrans %}
{{ key }} {% if values.old is defined %} {% if values.old is null %} {{ bootstrap.badge('null', 'secondary') }} {% else %} {{ bootstrap.text(helper.dump(values.old), 'danger') }} {% endif %} {% endif %} {% if values.new is defined %} {% if values.new is null %} {{ bootstrap.badge('null', 'secondary') }} {% else %} {% if values.old is null %} {{ bootstrap.text(helper.dump(values.new), 'primary') }} {% else %} {{ bootstrap.text(helper.dump(values.new), 'success') }} {% endif %} {% endif %} {% endif %}
{% endif %}