From 34af401a98cb9f41987ef2fd75d81ed59364ac29 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 29 Jun 2021 17:37:58 +0200 Subject: [PATCH] accompanying period: add items in the summary page --- .../views/AccompanyingPeriod/list.html.twig | 59 ++++++++++++++----- .../translations/messages.fr.yml | 3 + 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig index 0a237c2c9..4c9c89cce 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig @@ -8,7 +8,6 @@

{{ 'Accompanying period list'|trans }}

- {% for accompanying_period in accompanying_periods %}
@@ -16,8 +15,25 @@
{{'period'|trans}} #{{ accompanying_period.id }} {% if accompanying_period.emergency %} - - {{- 'Emergency'|trans -}} +   + + {{- 'Emergency'|trans|upper -}} + + {% endif %} + {% if accompanying_period.confidential %} +   + + {{- 'Confidential'|trans|upper -}} + + {% endif %} + {% if accompanying_period.step == 'DRAFT' %} +   + + {{- 'Draft'|trans|upper -}} + + {% else %} + + {{- 'Confirmed'|trans|upper -}} {% endif %}
@@ -51,8 +67,8 @@ {% endif %}
-
+

{{ 'Participants'|trans }}

{% if accompanying_period.participations.count > 0 %} {% for p in accompanying_period.participations %} @@ -65,20 +81,31 @@ {% else %} {{ 'No data given'|trans }} {% endif %} -
-
-

{{ 'Requestor'|trans }}

- {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %} - {% if accompanying_period.requestorPerson is not null %} -

{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}

+
+
+

{{ 'Requestor'|trans }}

+ {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %} + {% if accompanying_period.requestorPerson is not null %} +

{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}

+ {% endif %} + {% if accompanying_period.requestorThirdParty is not null %} +

{{ accompanying_period.requestorThirdParty.name }}

+ {% endif %} + {% else %} + {{ 'No data given'|trans }} {% endif %} - {% if accompanying_period.requestorThirdParty is not null %} -

{{ accompanying_period.requestorThirdParty.name }}

+
+ +
+

{{ 'Social issues'|trans }}

+ {% if accompanying_period.socialIssues.count > 0 %} + {% for si in accompanying_period.socialIssues %} +

{{ si.title|localize_translatable_string }}

+ {% endfor %} + {% else %} + {{ 'No data given'|trans }} {% endif %} - {% else %} - {{ 'No data given'|trans }} - {% endif %} -
+
    diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 234eeb656..ec2fedd81 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -324,6 +324,9 @@ accompanying_period: dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date% occasional: ponctuel regular: régulier +Confidential: confidentiel +Draft: brouillon +Confirmed: en file active # Accompanying Course Accompanying Course: Parcours d'accompagnement