Merge branch 'master' into dist/envole/6/master

This commit is contained in:
Arnaud Fornerot 2020-04-20 09:36:38 +02:00
commit 0cb286080d
6 changed files with 32 additions and 24 deletions

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'Interne', 'SIREN'); (-100, 'Interne', 'SIREN');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}lfWLOzsWTTGkrbaPndkzPSiFKH078TmD (-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}9tH17tlC86xamslwYLnhF4qiMaQqvbuL
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple'); ', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');

View File

@ -31,6 +31,7 @@ class GroupController extends Controller
private $labelentity = 'CadolesCoreBundle:Group'; private $labelentity = 'CadolesCoreBundle:Group';
private $labeldata = 'group'; private $labeldata = 'group';
private $labeldatas = 'groups'; private $labeldatas = 'groups';
private $idpage;
public function listAction($access) public function listAction($access)
{ {
@ -756,7 +757,7 @@ class GroupController extends Controller
$this->ctrlFgcanshare($data,$access); $this->ctrlFgcanshare($data,$access);
// Retour à la liste // Retour à la liste
return $this->redirectToRoute("cadoles_core_".$access."_group_users",["id"=>$data->getId()]); return $this->redirectToRoute("cadoles_core_".$access."_group_users",["id"=>$data->getId(),"idreturn"=>$this->idpage]);
} }
// Affichage du formulaire // Affichage du formulaire
@ -1098,7 +1099,10 @@ class GroupController extends Controller
$em->persist($page); $em->persist($page);
$em->persist($group); $em->persist($group);
$em->flush(); $em->flush();
} }
$pages=$group->getPages();
$this->idpage=$pages[0]->getId();
// On regarde s'il a au moins un calendrier // On regarde s'il a au moins un calendrier
if($group->getCalendars()->isEmpty()) { if($group->getCalendars()->isEmpty()) {

View File

@ -7,6 +7,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Cadoles\PortalBundle\Entity\Blogarticle; use Cadoles\PortalBundle\Entity\Blogarticle;
use Cadoles\PortalBundle\Form\BlogarticleType; use Cadoles\PortalBundle\Form\BlogarticleType;
@ -57,8 +58,8 @@ class BlogarticleController extends Controller
foreach($entity->getBlog()->getGroups() as $group) { foreach($entity->getBlog()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_blogarticle_view',["id"=>$entity->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_blogarticle_view','id'=>$entity->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Création article<br><a href='$url'>".$entity->getName()."</a>"; $message="Création article<br><a href='$url' target='_top'>".$entity->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();
@ -105,8 +106,8 @@ class BlogarticleController extends Controller
foreach($entity->getBlog()->getGroups() as $group) { foreach($entity->getBlog()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_blogarticle_view',["id"=>$entity->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_blogarticle_view','id'=>$entity->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Modification article<br><a href='$url'>".$entity->getName()."</a>"; $message="Modification article<br><a href='$url' target='_top'>".$entity->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();

View File

@ -7,6 +7,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Cadoles\PortalBundle\Entity\Blogcomment; use Cadoles\PortalBundle\Entity\Blogcomment;
use Cadoles\PortalBundle\Form\BlogcommentType; use Cadoles\PortalBundle\Form\BlogcommentType;
@ -57,8 +58,8 @@ class BlogcommentController extends Controller
foreach($entity->getBlogarticle()->getBlog()->getGroups() as $group) { foreach($entity->getBlogarticle()->getBlog()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_blogarticle_view',["id"=>$entity->getBlogarticle()->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_blogarticle_view','id'=>$entity->getBlogarticle()->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Création commentaire article<br><a href='$url'>".$entity->getName()."</a>"; $message="Création commentaire article<br><a href='$url' target='_top'>".$entity->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();
@ -105,8 +106,8 @@ class BlogcommentController extends Controller
foreach($entity->getBlogarticle()->getBlog()->getGroups() as $group) { foreach($entity->getBlogarticle()->getBlog()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_blogarticle_view',["id"=>$entity->getBlogarticle()->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_blogarticle_view','id'=>$entity->getBlogarticle()->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Modification commentaire article<br><a href='$url'>".$entity->getBlogarticle()->getName()."</a>"; $message="Modification commentaire article<br><a href='$url' target='_top'>".$entity->getBlogarticle()->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();

View File

@ -7,6 +7,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Cadoles\PortalBundle\Entity\Projectcomment; use Cadoles\PortalBundle\Entity\Projectcomment;
use Cadoles\PortalBundle\Form\ProjectcommentType; use Cadoles\PortalBundle\Form\ProjectcommentType;
@ -57,8 +58,9 @@ class ProjectcommentController extends Controller
foreach($entity->getProjecttask()->getProject()->getGroups() as $group) { foreach($entity->getProjecttask()->getProject()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getProjecttask()->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_projecttask_view','id'=>$entity->getProjecttask()->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Création commentaire tâche<br><a href='$url'>".$entity->getName()."</a>";
$message="Création commentaire tâche<br><a href='$url' target='_top'>".$entity->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();
@ -105,8 +107,8 @@ class ProjectcommentController extends Controller
foreach($entity->getProjecttask()->getProject()->getGroups() as $group) { foreach($entity->getProjecttask()->getProject()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getProjecttask()->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_projecttask_view','id'=>$entity->getProjecttask()->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Modification commentaire tâche<br><a href='$url'>".$entity->getProjecttask()->getName()."</a>"; $message="Modification commentaire tâche<br><a href='$url' target='_top'>".$entity->getProjecttask()->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();

View File

@ -66,8 +66,8 @@ class ProjecttaskController extends Controller
foreach($entity->getProject()->getGroups() as $group) { foreach($entity->getProject()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_projecttask_view','id'=>$entity->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message="Création tâche<br><a href='$url'>".$entity->getName()."</a>"; $message="Création tâche<br><a href='$url' target='_top'>".$entity->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();
@ -124,13 +124,13 @@ class ProjecttaskController extends Controller
foreach($entity->getProject()->getGroups() as $group) { foreach($entity->getProject()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_projecttask_view','id'=>$entity->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
if($oldpercentage<100&$entity->getPercentage()==100) if($oldpercentage<100&$entity->getPercentage()==100)
$message="Tâche terminée<br><a href='$url'>".$entity->getName()."</a>"; $message="Tâche terminée<br><a href='$url' target='_top'>".$entity->getName()."</a>";
elseif($oldpercentage==100&$entity->getPercentage()<100) elseif($oldpercentage==100&$entity->getPercentage()<100)
$message="Tâche réouverte<br><a href='$url'>".$entity->getName()."</a>"; $message="Tâche réouverte<br><a href='$url' target='_top'>".$entity->getName()."</a>";
else else
$message="Modification tâche<br><a href='$url'>".$entity->getName()."</a>"; $message="Modification tâche<br><a href='$url' target='_top'>".$entity->getName()."</a>";
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) { if($usergroup) {
$key=$usergroup->getKeyvalue(); $key=$usergroup->getKeyvalue();
@ -389,12 +389,12 @@ class ProjecttaskController extends Controller
foreach($entity->getProject()->getGroups() as $group) { foreach($entity->getProject()->getGroups() as $group) {
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$url=$this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getId()]); $url=$this->generateUrl('cadoles_core_redirect', ['route'=>'cadoles_portal_user_projecttask_view','id'=>$entity->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
$message=""; $message="";
if($oldpercentage<100&$entity->getPercentage()==100) if($oldpercentage<100&$entity->getPercentage()==100)
$message="Tâche terminée<br><a href='$url'>".$entity->getName()."</a>"; $message="Tâche terminée<br><a href='$url' target='_top'>".$entity->getName()."</a>";
elseif($oldpercentage==100&$entity->getPercentage()<100) elseif($oldpercentage==100&$entity->getPercentage()<100)
$message="Tâche réouverte<br><a href='$url'>".$entity->getName()."</a>"; $message="Tâche réouverte<br><a href='$url' target='_top'>".$entity->getName()."</a>";
if($message!="") { if($message!="") {
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]); $usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);