diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index 27a56aa80..68860c593 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -61,3 +61,8 @@ CHILL_EVENT_SEE_DETAILS: Voir les détails d'un événement Next step: Étape suivante To which centre should the event be associated ?: À quel centre doit être associé l'événement ? +# timeline +past: passé +futur: futur +'subscribed by %user% to event "%event%" (%event_type%)': inscrit par %user% à l'événement "%event%" (%event_type%) +Show the event: Voir l'événement diff --git a/Resources/views/Timeline/event_person_context.html.twig b/Resources/views/Timeline/event_person_context.html.twig index c27dcdbaa..274ace1f3 100644 --- a/Resources/views/Timeline/event_person_context.html.twig +++ b/Resources/views/Timeline/event_person_context.html.twig @@ -1,32 +1,33 @@ {% import 'ChillEventBundle:EventReason:macro.html.twig' as m %} -{{ dump() }} -
-    event :
-| #{{ event.id }} | {{ event.date|localizeddate('short', 'short') }} | {{ event.name }} | center {{ event.center.id }} | circle {{ event.circle.id }} | type {{ event.type.id }} | {{ event.moderator }} |
-    participations :
-{% for participation in event.participations %}
-| #{{ participation.id }} | {{ participation.person }} | {{ participation.role.name|localize_translatable_string }} | {{ participation.status.name|localize_translatable_string }} | lastupdate {{ participation.lastupdate|localizeddate('short', 'short') }} |
-{% endfor %}
-
- {# -TODO -- user a inscrit la personne à l'événement machin -- user a modifié le statut de la personne inscrite à l'événement machin. nouveau statut : -- user a modifié le rôle de la personne inscrite à l'événement machin. nouveau rôle : -- participation de la personne à l'événement machin + {{ dump() }} +
+        event :
+    | #{{ event.id }} | {{ event.date|localizeddate('short', 'short') }} | {{ event.name }} | center {{ event.center.id }} | circle {{ event.circle.id }} | type {{ event.type.id }} | {{ event.moderator }} |
+        participations :
+    {% for participation in event.participations %}
+    | #{{ participation.id }} | {{ participation.person }} | {{ participation.role.name|localize_translatable_string }} | {{ participation.status.name|localize_translatable_string }} | lastupdate {{ participation.lastupdate|localizeddate('short', 'short') }} |
+    {% endfor %}
+    
#} +{% if "now"|date('d/m/Y') < event.date|date('d/m/Y') %} + {% set boolDate = 'past' %} +{% else %} + {% set boolDate = 'futur' %} +{% endif %}
-

{{ event.date|localizeddate('long', 'none') }} / {{ 'Event'|trans }}

+

{{ event.date|localizeddate('long', 'none') }} + / {{ 'Event'|trans }} {{ boolDate|trans }}

- {{ '%user% has done an %event_type%'|trans( - { - '%user%' : user, - '%event_type%': event.type.name|localize_translatable_string, - '%date%' : event.date|localizeddate('long', 'none') } - ) }} + {{ 'subscribed by %user% to event "%event%" (%event_type%)'|trans({ + '%user%' : user, + '%person%' : person, + '%event%' : event.name, + '%event_type%': event.type.name|localize_translatable_string, + '%date%' : event.date|localizeddate('long', 'none') } + ) }} {% if is_granted(constant('Chill\\ActivityBundle\\Security\\Authorization\\ActivityVoter::SEE_DETAILS'), event) %}