diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index 7d0e841cf..3de0e30f4 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -216,4 +216,20 @@ class AccompanyingCourseController extends Controller 'accompanying_period_id' => $period->getId(), ]); } + + + + /** + * Comments page of Accompanying Course section. + * + * @Route("/{_locale}/parcours/{accompanying_period_id}/comment", name="chill_person_accompanying_period_comment_list") + * @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"}) + */ + public function commentAction(AccompanyingPeriod $accompanyingCourse): Response + { + return $this->render('@ChillPerson/AccompanyingCourse/comment_list.html.twig', [ + 'accompanyingCourse' => $accompanyingCourse, + ]); + } + } diff --git a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php index fed840954..60455b201 100644 --- a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -73,6 +73,13 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface ], ]) ->setExtras(['order' => 40]); + $menu->addChild($this->translator->trans('Accompanying Course Comment'), [ + 'route' => 'chill_person_accompanying_period_comment_list', + 'routeParameters' => [ + 'accompanying_period_id' => $period->getId(), + ], ]) + ->setExtras(['order' => 50]); + $workflow = $this->registry->get($period, 'accompanying_period_lifecycle'); if ($workflow->can($period, 'close')) { diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig new file mode 100644 index 000000000..a81721530 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/comment_list.html.twig @@ -0,0 +1,11 @@ +{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %} + +{% block title %} + {{ 'Accompanying Course Comment list'|trans }} +{% endblock %} + +{% block content %} +
{{ block('title') }}
+