{% extends "@DHDoctrineAudit/layout.html.twig" %} {% import '@DHDoctrineAudit/Audit/bootstrap.html.twig' as bootstrap %} {% import '@DHDoctrineAudit/Audit/helper.html.twig' as helper %} {% block dh_doctrine_audit_content %}
{% set diffs = entry.getDiffs() %}

{{ entity }}#{{ entry.getObjectId() }}

{{ bootstrap.badge(entry.type, bootstrap.label_type(entry.type)) }}
{{ helper.humanize(entity, entry) }}
{% if entry.type in ['associate', 'dissociate'] %} {% for key, value in diffs.target %} {% endfor %}
Property Target
{{ key }} {{ bootstrap.text(helper.dump(value), 'secondary') }}
{% elseif entry.type == 'remove' %} {% for key, value in diffs %} {% endfor %}
Property Target
{{ key }} {{ bootstrap.text(helper.dump(value), 'secondary') }}
{% else %} {% for key, values in diffs %} {% endfor %}
Property Old value New value
{{ key }} {% if values.old is defined %} {% if values.old is empty %} {{ bootstrap.badge('null', 'secondary') }} {% else %} {{ bootstrap.text(helper.dump(values.old), 'danger') }} {% endif %} {# {% else %}#} {# {% if values['-'] is empty %}#} {# {{ bootstrap.badge('null', 'secondary') }}#} {# {% else %}#} {# {{ bootstrap.text(helper.dump(values['-']), 'danger') }}#} {# {% endif %}#} {% endif %} {% if values.new is defined %} {% if values.new is empty %} {{ bootstrap.badge('null', 'secondary') }} {% else %} {% if values.old is empty %} {{ bootstrap.text(helper.dump(values.new), 'primary') }} {% else %} {{ bootstrap.text(helper.dump(values.new), 'success') }} {% endif %} {% endif %} {# {% else %}#} {# {% if values['+'] is empty %}#} {# {{ bootstrap.badge('null', 'secondary') }}#} {# {% else %}#} {# {% if values['-'] is empty %}#} {# {{ bootstrap.text(helper.dump(values['+']), 'primary') }}#} {# {% else %}#} {# {{ bootstrap.text(helper.dump(values['+']), 'success') }}#} {# {% endif %}#} {# {% endif %}#} {% endif %}
{% endif %}
{% endblock dh_doctrine_audit_content %}