create comments page, with menu entry, route and template

This commit is contained in:
Mathieu Jaumotte 2021-12-13 17:25:39 +01:00
parent f4396459a0
commit d5290e4bdd
4 changed files with 36 additions and 0 deletions

View File

@ -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,
]);
}
}

View File

@ -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')) {

View File

@ -0,0 +1,11 @@
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
{% block title %}
{{ 'Accompanying Course Comment list'|trans }}
{% endblock %}
{% block content %}
<div class="accompanyingcourse-comment-list">
<h1>{{ block('title') }}</h1>
</div>
{% endblock %}

View File

@ -407,6 +407,8 @@ Choose a person to locate by: Localiser auprès d'un usager concerné
Associate at least one member with an household, and set an address to this household: Associez au moins un membre du parcours à un ménage, et indiquez une adresse à ce ménage.
Locate by: Localiser auprès de
fix it: Compléter
Accompanying Course Comment: Commentaire
Accompanying Course Comment list: Commentaires du parcours
# Household
Household: Ménage