diff --git a/src/DoctrineAuditBundle/Resources/views/Audit/entry.html.twig b/src/DoctrineAuditBundle/Resources/views/Audit/entry.html.twig
index 5a745024..82340bb7 100644
--- a/src/DoctrineAuditBundle/Resources/views/Audit/entry.html.twig
+++ b/src/DoctrineAuditBundle/Resources/views/Audit/entry.html.twig
@@ -37,7 +37,7 @@
{{ key }} |
{% if values.old is defined %}
- {% if values.old is empty %}
+ {% if values.old is null %}
{{ bootstrap.badge('null', 'secondary') }}
{% else %}
{{ bootstrap.text(helper.dump(values.old), 'danger') }}
@@ -46,10 +46,10 @@
|
{% if values.new is defined %}
- {% if values.new is empty %}
+ {% if values.new is null %}
{{ bootstrap.badge('null', 'secondary') }}
{% else %}
- {% if values.old is empty %}
+ {% if values.old is null %}
{{ bootstrap.text(helper.dump(values.new), 'primary') }}
{% else %}
{{ bootstrap.text(helper.dump(values.new), 'success') }}
diff --git a/src/DoctrineAuditBundle/Resources/views/Audit/helpers/helper.html.twig b/src/DoctrineAuditBundle/Resources/views/Audit/helpers/helper.html.twig
index 049b993c..e8d4d100 100644
--- a/src/DoctrineAuditBundle/Resources/views/Audit/helpers/helper.html.twig
+++ b/src/DoctrineAuditBundle/Resources/views/Audit/helpers/helper.html.twig
@@ -1,5 +1,6 @@
{% macro dump(value, separator) %}
{% import _self as helper %}
+{% import '@DHDoctrineAudit/Audit/bootstrap.html.twig' as bootstrap %}
{% apply spaceless %}
{% if value.label is defined %}
{{ value.label }}
@@ -7,6 +8,10 @@
{% for k, v in value %}
{{ k }}: {{ helper.dump(v) }}{{ separator|default(' ')|raw }}
{% endfor %}
+ {% elseif value is same as(true) %}
+ {{ 'true' }}
+ {% elseif value is same as(false) %}
+ {{ 'false' }}
{% else %}
{{ value }}
{% endif %}
|