From af898cbd1266ef002485df2b7823e0d7c452158d Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 25 May 2022 13:27:29 +0200 Subject: [PATCH] person: add closing motive to closed acc course --- CHANGELOG.md | 1 + .../views/AccompanyingCourse/index.html.twig | 13 +++++++++++++ .../views/Person/list_with_period.html.twig | 15 ++++++++++++++- .../translations/messages.fr.yml | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 077cc0242..b9fa2851a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to ## Unreleased +* [person] add closing motive to closed acc course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/603) * [admin] refactorisation of the admin section: reorganisation of the menu, translations, form types, new entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/592) * [admin] add admin section for languages and countries (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/596) * [activity] activity admin: translations + remove label field for comment on admin activity type (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/587) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index 7a4f18b1d..8e0a46efc 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -30,6 +30,19 @@
+ {% if 'CLOSED' == accompanyingCourse.step %} +
+
+
+

{{ 'This course is closed'|trans }}

+

+ {{ 'Closing motive'|trans }} : {{ accompanyingCourse.closingMotive.name|localize_translatable_string }} +

+
+
+
+ {% endif %} + {% if 'DRAFT' == accompanyingCourse.step %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index 9c7486fc2..c407b6c57 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -149,6 +149,19 @@ {% endif %} {% endif %} + {% if acp.step == 'CLOSED' and acp.closingMotive is not null %} +
+
+

{{ 'Closing motive'|trans }}

+
+
+
+ {{ acp.closingMotive.name|localize_translatable_string }} +
+
+
+ {% endif %} +
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index c2c27f58a..2109e6da9 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -171,6 +171,7 @@ Update accompanying period: Mettre à jour une période d'accompagnement 'Period not opened': "La période d'accompagnement n'a pas été ouverte" "Period not opened : form is invalid": "La période n'a pas été ouverte: le formulaire est invalide." 'Closing motive': 'Motif de clôture' +This course is closed: Ce parcours est clôturé Close accompanying course: Clôturer le parcours Re-open accompanying course: Ré-ouvrir le parcours 'Person details': 'Détails de la personne'