From dca6f700e56941f654e59179da04118785973133 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 6 Apr 2020 10:23:27 +0200 Subject: [PATCH] initialiser le template de page des groupes de travail (ref #106) --- .../Cadoles/CoreBundle/Controller/GroupController.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php index 5a42a942..0fb55479 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php @@ -699,8 +699,14 @@ class GroupController extends Controller $data->setFgcancreatepage(false); $data->setFgcancreatecalendar(false); $data->setFgcancreateblog(false); - if($access=="user") $data->setOwner($this->getUser()); - + if($access=="user") { + $data->setOwner($this->getUser()); + if($this->getParameter("portal_activate")) { + $template=$em->getRepository("CadolesPortalBundle:Page")->findoneby(["parentfor"=>"group"]); + $data->setPagetemplate($template); + } + } + // Création du formulaire $form = $this->createForm(GroupType::class,$data,array( "mode"=>"submit",