mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
Fixed: [calendar] Fix picking calendar document templating, when adding document in person context
This commit is contained in:
@@ -72,11 +72,21 @@ class CalendarDocController
|
||||
);
|
||||
}
|
||||
|
||||
return new Response(
|
||||
$this->engine->render('@ChillCalendar/CalendarDoc/pick_template.html.twig', [
|
||||
'calendar' => $calendar,
|
||||
'accompanyingCourse' => $calendar->getAccompanyingPeriod(),
|
||||
])
|
||||
);
|
||||
switch ($calendar->getContext()) {
|
||||
case 'person':
|
||||
return new Response(
|
||||
$this->engine->render('@ChillCalendar/CalendarDoc/pick_template_person.html.twig', [
|
||||
'calendar' => $calendar,
|
||||
])
|
||||
);
|
||||
case 'accompanying_period':
|
||||
return new Response(
|
||||
$this->engine->render('@ChillCalendar/CalendarDoc/pick_template_accompanying_period.html.twig', [
|
||||
'calendar' => $calendar,
|
||||
])
|
||||
);
|
||||
default:
|
||||
throw new \UnexpectedValueException("calendar context not expected : " . $calendar->getContext());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user