From 9ec4c77fb77eef936ef336a0253ade74e998a687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 11 Jun 2024 16:55:15 +0200 Subject: [PATCH] systematically at a parameter 'at_date' when displaying createdBy in twig template The rendering of the 'createdBy' entity has been updated across various .twig files to include the 'at_date' property. This makes the date an entity was created more explicit, providing clearer information to the user. --- .../Resources/views/Calendar/_list.html.twig | 2 +- .../showEvaluationDocumentInNotification.html.twig | 2 +- .../Resources/views/Macro/updatedBy.html.twig | 6 +++--- .../ChillPersonBundle/Resources/views/Person/view.html.twig | 2 +- .../Resources/views/Workflow/_evaluation.html.twig | 2 +- .../Resources/views/Workflow/_evaluation_document.html.twig | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_list.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_list.html.twig index 264836ecb..057139bd3 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_list.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_list.html.twig @@ -132,7 +132,7 @@
  • {{ 'Created by'|trans }} - {{ calendar.activity.createdBy|chill_entity_render_string }}, {{ 'on'|trans }} {{ calendar.activity.createdAt|format_datetime('short', 'short') }} + {{ calendar.activity.createdBy|chill_entity_render_string({'at_date': calendar.activity.createdAt}) }}, {{ 'on'|trans }} {{ calendar.activity.createdAt|format_datetime('short', 'short') }}
  • {% if is_granted('CHILL_ACTIVITY_SEE', calendar.activity) %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig index 0341e42e5..1967cce02 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig @@ -89,7 +89,7 @@
  • {% if evaluation.createdBy is not null %} créé par - {{ evaluation.createdBy.username }} + {{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }} {% endif %} {% if evaluation.createdAt is not null %} {{ 'le'|trans }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig index cbfd7660b..74e2c9484 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig @@ -13,7 +13,7 @@ {{ 'Last updated by'|trans }} {% endif %} - {{ entity.updatedBy|chill_entity_render_box }} + {{ entity.updatedBy|chill_entity_render_box({'at_date': entity.updatedAt }) }} {% endif %} @@ -34,8 +34,8 @@ {{ 'Created by'|trans }} {% endif %} - {{ entity.createdBy|chill_entity_render_string }} + {{ entity.createdBy|chill_entity_render_string({'at_date': entity.createdAt}) }} {% endif %} -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig index 094e23427..8f3d1df6b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig @@ -296,7 +296,7 @@ This view should receive those arguments:
    {% if person.createdBy %}
    - {{ 'Created by'|trans}}: {{ person.createdBy|chill_entity_render_box }},
    + {{ 'Created by'|trans}}: {{ person.createdBy|chill_entity_render_box({'at_date': person.createdAt}) }},
    {{ 'on'|trans ~ person.createdAt|format_datetime('long', 'short') }}
    {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig index b49455cfd..d90dccdab 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig @@ -64,7 +64,7 @@
  • {% if evaluation.createdBy is not null %} créé par - {{ evaluation.createdBy.username }} + {{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }} {% endif %} {% if evaluation.createdAt is not null %} {{ 'le'|trans }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig index 112d4089d..26979a8a6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig @@ -92,7 +92,7 @@
  • {% if evaluation.createdBy is not null %} créé par - {{ evaluation.createdBy.username }} + {{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }} {% endif %} {% if evaluation.createdAt is not null %} {{ 'le'|trans }}