From 6afd8ae3cdf43e01e90ea57346ad86541df48eef Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 4 Nov 2021 15:21:12 +0100 Subject: [PATCH] accompanying period work: add delete twig --- .../AccompanyingCourseWorkController.php | 5 +++-- .../AccompanyingCourseWork/delete.html.twig | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php index 2dac6315b..6c5ffc7cb 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php @@ -169,8 +169,9 @@ class AccompanyingCourseWorkController extends AbstractController // } return $this->render('@ChillPerson/AccompanyingCourseWork/delete.html.twig', array( - 'work' => $work, - 'delete_form' => $form->createView() + 'accompanyingCourse' => $work->getAccompanyingPeriod(), + 'work' => $work, + 'delete_form' => $form->createView() )); } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig new file mode 100644 index 000000000..e3f2c644e --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig @@ -0,0 +1,16 @@ +{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %} + +{% set activeRouteKey = 'chill_activity_activity_list' %} + +{% block title 'Remove activity'|trans %} + +{% block content %} + {{ include('@ChillMain/Util/confirmation_template.html.twig', + { + 'title' : 'Remove activity'|trans, + 'confirm_question' : 'Are you sure you want to remove the activity about "%name%" ?'|trans({ '%name%' : work.id } ), + 'cancel_route' : 'chill_activity_activity_list', + 'cancel_parameters' : { 'accompanying_period_id' : work.id}, + 'form' : delete_form + } ) }} +{% endblock %}