diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php
index f8f7aff1..fbdc9164 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php
@@ -359,7 +359,11 @@ class ProjectController extends Controller
if($groups) {
if($groups[0]->getFgcanshare()) {
$pages=$groups[0]->getPages();
- if($pages) $idpage=$pages[0]->getId();
+ if($pages) {
+ $idpage=$pages[0]->getId();
+ $groups=$pages[0]->getGroups();
+ $idgroup=$groups[0]->getId();
+ }
}
}
}
@@ -428,7 +432,8 @@ class ProjectController extends Controller
'countarticles' => $count,
'pagination' => $pagination,
'page' => $page,
- 'idpage' => $idpage
+ 'idpage' => $idpage,
+ 'idgroup' => $idgroup
]);
}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php
index da155215..063af716 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php
@@ -51,6 +51,11 @@ class ProjecttaskController extends Controller
$entity->setPriority(0);
$entity->setPercentage(0);
$pageid=$request->get("page");
+ if($pageid) {
+ $page=$em->getRepository("CadolesPortalBundle:Page")->find($pageid);
+ $groups=$page->getGroups();
+ $idgroup=$groups[0]->getId();
+ }
$form = $this->entityForm($entity,$access);
$form->handleRequest($request);
@@ -82,7 +87,7 @@ class ProjecttaskController extends Controller
if(is_null($pageid))
return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getId()]));
else
- return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view',["id"=>$pageid]));
+ return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view',["id"=>$pageid,"usage"=>"group","group"=>$idgroup]));
}
return $this->render($this->labelentity.':edit.html.twig', [
@@ -196,10 +201,15 @@ class ProjecttaskController extends Controller
// On recherche la premiere page associé au groupe du projet
$groups=$entity->getProject()->getGroups();
$idpage=null;
+ $idgroup=null;
if($groups) {
if($groups[0]->getFgcanshare()) {
$pages=$groups[0]->getPages();
- if($pages) $idpage=$pages[0]->getId();
+ if($pages) {
+ $idpage=$pages[0]->getId();
+ $groups=$pages[0]->getGroups();
+ $idgroup=$groups[0]->getId();
+ }
}
}
@@ -297,6 +307,7 @@ class ProjecttaskController extends Controller
'projecttasks' => $projecttasks,
'files' => $files,
'idpage' => $idpage,
+ 'idgroup' => $idgroup,
]);
}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig
index a4f3d5ba..ee875146 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig
@@ -81,7 +81,7 @@
{{ projecttask.user.username }}
{% endif %}
Crée le {{ projecttask.submit|date("d/m/Y à H:i") }}
-
Dans le project {{projecttask.project.name }}
+
Dans le projet {{projecttask.project.name }}