-
- {% if calendar.startDate %}
-
{{ calendar.startDate|format_datetime('long') }}
- {% endif %}
-
- {% if calendar.endDate %}
-
{{ calendar.endDate|format_datetime('long') }}
- {% endif %}
-
-
-
-
- {{ calendar.endDate.diff(calendar.startDate)|date("%H:%M")}}
-
-
+
+ {% if calendar.startDate and calendar.endDate %}
+ {% if calendar.endDate.diff(calendar.startDate).days >= 1 %}
+
{{ "From the day"|trans }} {{ calendar.startDate|format_datetime('medium', 'short') }}
+
{{ "to the day"|trans }} {{ calendar.endDate|format_datetime('medium', 'short') }}
+ {% else %}
+
{{ calendar.startDate|format_date('full') }}
+
{{ calendar.startDate|format_datetime('none', 'short', locale='fr') }} - {{ calendar.endDate|format_datetime('none', 'short', locale='fr') }}
+
+
+
+
+ {{ calendar.endDate.diff(calendar.startDate)|date("%H:%M")}}
+
+
+ {% endif %}
+
+ {% endif %}
{% if context == 'user' and calendar.accompanyingPeriod is not empty %}
@@ -66,7 +69,7 @@
{% if calendar.mainUser is not empty %}
- {{ 'main user concerned'|trans }}{{ calendar.mainUser.usernameCanonical }}
+ {{ 'main user concerned'|trans }}: {{ calendar.mainUser.usernameCanonical }}
{% endif %}
diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
index f6df7ccdf..efab85442 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
+++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
@@ -11,11 +11,18 @@
{{ 'Calendar data'|trans }}
- {{ 'start date'|trans }}
- {{ entity.startDate|format_datetime('long') }}
-
- {{ 'end date'|trans }}
- {{ entity.endDate|format_datetime('long') }}
+ {% if entity.endDate.diff(entity.startDate).days >= 1 %}
+ {{ "From the day"|trans }} {{ entity.startDate|format_datetime('medium', 'short') }}
+ {{ "to the day"|trans }} {{ entity.endDate|format_datetime('medium', 'short') }}
+
+
+ {% else %}
+
+ {{ entity.startDate|format_date('full') }},
+ {{ entity.startDate|format_datetime('none', 'short', locale='fr') }} - {{ entity.endDate|format_datetime('none', 'short', locale='fr') }}
+
+
+ {% endif %}
{{ 'cancel reason'|trans }}
diff --git a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml
index e111f3c12..f95b27cb8 100644
--- a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml
@@ -6,7 +6,7 @@ Are you sure you want to remove the calendar item?: Êtes-vous sûr de vouloir s
Concerned groups: Parties concernées
Calendar data: Données du rendez-vous
Update calendar: Modifier le rendez-vous
-main user concerned: Utilisateur principal
+main user concerned: Utilisateur concerné
Main user: Utilisateur principal
Calendar item creation: Création du rendez-vous
start date: début du rendez-vous
@@ -20,3 +20,5 @@ Cancel reason: Motif d'annulation
Add a new calendar: Ajouter un nouveau rendez-vous
"Success : calendar item updated!": "Rendez-vous mis à jour"
The calendar item has been successfully removed.: Le rendez-vous a été supprimé
+From the day: Du
+to the day: au
\ No newline at end of file