diff --git a/src/Bundle/ChillMainBundle/Resources/views/Scope/history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Scope/history.html.twig
index 952aa3a5b..b7d4d6d18 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Scope/history.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Scope/history.html.twig
@@ -15,12 +15,20 @@
{{ entity.startDate|format_datetime('medium') }} |
- {{ (entity.endDate is null)
- ? "crud.admin_user_scope_history.index.today"|trans
- : entity.endDate|format_datetime('medium') }}
+ {% if entity.endDate is not null %}
+ {{ entity.endDate|format_datetime('medium') }}
+ {% else %}
+ {{ "crud.admin_user_scope_history.index.today"|trans }}
+ {% endif %}
|
{{ entity.user.usernameCanonical }} |
- {{ entity.scope.name|localize_translatable_string }} |
+
+ {% if entity.scope %}
+ {{ entity.scope.name|localize_translatable_string }}
+ {% else %}
+ {{ 'crud.admin_user_scope_history.index.undefined'|trans }}
+ {% endif %}
+ |
{% endfor %}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/UserJob/history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/UserJob/history.html.twig
index 75ad32058..a0adf3e30 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/UserJob/history.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/UserJob/history.html.twig
@@ -15,12 +15,20 @@
{{ entity.startDate|format_datetime('medium') }} |
- {{ (entity.endDate is null)
- ? "crud.admin_user_job_history.index.today"|trans
- : entity.endDate|format_datetime('medium') }}
+ {% if entity.endDate is not null %}
+ {{ entity.endDate|format_datetime('medium') }}
+ {% else %}
+ {{ "crud.admin_user_job_history.index.today"|trans }}
+ {% endif %}
|
{{ entity.user.usernameCanonical }} |
- {{ entity.job.label|localize_translatable_string }} |
+
+ {% if entity.job %}
+ {{ entity.job.label|localize_translatable_string }}
+ {% else %}
+ {{ 'crud.admin_user_job_history.index.undefined'|trans }}
+ {% endif %}
+ |
{% endfor %}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
index e4977eb60..05a02bde1 100644
--- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
@@ -394,7 +394,8 @@ crud:
title: Historique des métiers
start: Du
end: Jusque
- today: aujourd'hui
+ today: en cours
+ undefined: non défini
user: Utilisateur
job: Métier
Show job history: Voir l'historique
@@ -404,7 +405,8 @@ crud:
title: Historique des cercles
start: Du
end: Jusque
- today: aujourd'hui
+ today: en cours
+ undefined: non défini
user: Utilisateur
scope: Cercle
Show scope history: Voir l'historique