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

This commit is contained in:
Arnaud Fornerot 2021-03-24 09:21:53 +01:00
commit 74c0a44f56
40 changed files with 1745 additions and 112 deletions

View File

@ -26,6 +26,7 @@ class FileController extends Controller
$clear=$request->get("clear"); $clear=$request->get("clear");
$view=$request->get("view"); $view=$request->get("view");
$sort=$request->get("sort"); $sort=$request->get("sort");
$order=$request->get("order");
$defaultview=$request->get("defaultview"); $defaultview=$request->get("defaultview");
// Récupérer les préférences utilisateur // Récupérer les préférences utilisateur
@ -68,7 +69,7 @@ class FileController extends Controller
$preference["widgetviewdirectory"][$directory]=$view; $preference["widgetviewdirectory"][$directory]=$view;
} }
// Prérence trie // Prérence trie
if(!array_key_exists("widgetsortdirectory",$preference)) { if(!array_key_exists("widgetsortdirectory",$preference)) {
$toupdate=true; $toupdate=true;
$preference["widgetsortdirectory"]=[]; $preference["widgetsortdirectory"]=[];
@ -82,6 +83,21 @@ class FileController extends Controller
$preference["widgetsortdirectory"][$directory]=$sort; $preference["widgetsortdirectory"][$directory]=$sort;
} }
// Préférence order
if(!array_key_exists("widgetorderdirectory",$preference)) {
$toupdate=true;
$preference["widgetorderdirectory"]=[];
}
if((!array_key_exists($directory,$preference["widgetorderdirectory"]))) {
$toupdate=true;
$preference["widgetorderdirectory"][$directory]="SORT_ASC";
}
if($sort&&$preference["widgetorderdirectory"][$directory]!=$order) {
$toupdate=true;
$preference["widgetorderdirectory"][$directory]=$order;
}
// Mise à jour des préferences // Mise à jour des préferences
if($toupdate) { if($toupdate) {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
@ -109,23 +125,27 @@ class FileController extends Controller
if($fs->exists($fulldirectory)) { if($fs->exists($fulldirectory)) {
$finder = new Finder(); $finder = new Finder();
$finder->depth('== 0')->sortByName()->in($fulldirectory)->exclude('thumb')->exclude('thumbmini'); $finder->depth('== 0')->sortByName()->in($fulldirectory)->exclude('thumb')->exclude('thumbmini')->exclude('__trash');
foreach ($finder as $file) { foreach ($finder as $file) {
if(is_dir($file)) { if(is_dir($file)) {
$tmp=[]; $tmp=[];
$tmp["name"]=$file->getRelativePathname(); $tmp["name"]=$file->getRelativePathname();
$tmp["namesort"]=strtolower($tmp["name"]);
$tmp["date"]=date ("d/m/Y H:i", filemtime($file)); $tmp["date"]=date ("d/m/Y H:i", filemtime($file));
$tmp["datesort"] = date ("YmdHi", filemtime($file));
array_push($dirs,$tmp); array_push($dirs,$tmp);
} }
else { else {
$tmp=[]; $tmp=[];
$tmp["name"]=$file->getRelativePathname(); $tmp["name"]=$file->getRelativePathname();
$tmp["namesort"]=strtolower($tmp["name"]);
$tmp["extension"]=strtolower($file->getExtension()); $tmp["extension"]=strtolower($file->getExtension());
$fileinfo = new file($file->getPathname()); $fileinfo = new file($file->getPathname());
$tmp["minetype"]=$fileinfo->getMimeType(); $tmp["minetype"]=$fileinfo->getMimeType();
$tmp["minefamily"]=explode("/",$tmp["minetype"])[0]; $tmp["minefamily"]=explode("/",$tmp["minetype"])[0];
$tmp["date"] = date ("d/m/Y H:i", filemtime($file)); $tmp["date"] = date ("d/m/Y H:i", filemtime($file));
$tmp["datesort"] = date ("YmdHi", filemtime($file));
$tmp["thumb"]=""; $tmp["thumb"]="";
if($tmp["extension"]=="pdf") { if($tmp["extension"]=="pdf") {
@ -148,12 +168,22 @@ class FileController extends Controller
} }
} }
// Trie du tableu // Flag poubelle
$sort = array_column($files, $preference["widgetsortdirectory"][$directory]); $fgtrash=false;
array_multisort($sort, SORT_ASC, $files); if(stripos($subdirectory,"_trash")==1) $fgtrash=true;
$sort = array_column($dirs, $preference["widgetsortdirectory"][$directory]); // Trie du tableu
array_multisort($sort, SORT_ASC, $dirs); $sort = array_column($files, $preference["widgetsortdirectory"][$directory]."sort");
if($preference["widgetorderdirectory"][$directory]=="SORT_ASC")
array_multisort($sort, SORT_ASC, $files);
else
array_multisort($sort, SORT_DESC, $files);
$sort = array_column($dirs, $preference["widgetsortdirectory"][$directory]."sort");
if($preference["widgetorderdirectory"][$directory]=="SORT_ASC")
array_multisort($sort, SORT_ASC, $dirs);
else
array_multisort($sort, SORT_DESC, $dirs);
return $this->render('CadolesCoreBundle:File:list.html.twig',[ return $this->render('CadolesCoreBundle:File:list.html.twig',[
'useheader' => false, 'useheader' => false,
@ -171,14 +201,19 @@ class FileController extends Controller
'canadd' => $canupdate, 'canadd' => $canupdate,
'view' => $preference["widgetviewdirectory"][$directory], 'view' => $preference["widgetviewdirectory"][$directory],
'sort' => $preference["widgetsortdirectory"][$directory], 'sort' => $preference["widgetsortdirectory"][$directory],
'order' => $preference["widgetorderdirectory"][$directory],
'fgtrash' => $fgtrash,
]); ]);
} }
public function uploadAction($id,$type,Request $request,$access="config") public function uploadAction($id,$type,Request $request,$access="config")
{ {
$subdirectory=$request->get("subdirectory"); $canupdate =$this->getPermission($access,$id);
$forcereload=(is_null($request->get("forcereload"))?true:$request->get("forcereload")); if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$subdirectory=urldecode($request->get("subdirectory"));
$forcereload=(is_null($request->get("forcereload"))?true:$request->get("forcereload"));
return $this->render('CadolesCoreBundle:File:upload.html.twig',[ return $this->render('CadolesCoreBundle:File:upload.html.twig',[
'useheader' => false, 'useheader' => false,
'usemenu' => false, 'usemenu' => false,
@ -193,8 +228,10 @@ class FileController extends Controller
public function subdirectoryAction($id,$type,Request $request,$access="config") public function subdirectoryAction($id,$type,Request $request,$access="config")
{ {
$subdirectory=$request->get("subdirectory"); $canupdate =$this->getPermission($access,$id);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$subdirectory=$request->get("subdirectory");
$defaultData = []; $defaultData = [];
$form = $this->createFormBuilder() $form = $this->createFormBuilder()
->add('subdirectory', TextType::class,["label"=>"Répertoire"]) ->add('subdirectory', TextType::class,["label"=>"Répertoire"])
@ -206,7 +243,7 @@ class FileController extends Controller
if ($form->isSubmitted() && $form->isValid()) { if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData(); $data = $form->getData();
if($data["subdirectory"]=="thumb"||$data["subdirectory"]=="thumbmini") { if($data["subdirectory"]=="thumb"||$data["subdirectory"]=="thumbmini"||$data["subdirectory"]=="__trash") {
$form->addError(new FormError('Nom de répertoire réservé, merci de choisir un autre nom de répertoire')); $form->addError(new FormError('Nom de répertoire réservé, merci de choisir un autre nom de répertoire'));
$this->get('session')->getFlashBag()->clear(); $this->get('session')->getFlashBag()->clear();
$request->getSession()->getFlashBag()->add("error", 'Nom de répertoire réservé, merci de choisir un autre nom de répertoire'); $request->getSession()->getFlashBag()->add("error", 'Nom de répertoire réservé, merci de choisir un autre nom de répertoire');
@ -234,6 +271,223 @@ class FileController extends Controller
]); ]);
} }
public function renameAction($id,$oldname, Request $request,$access="config")
{
$canupdate =$this->getPermission($access,$id);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$subdirectory=$request->get("subdirectory");
$form = $this->createFormBuilder()
->add('subdirectory', TextType::class,["label"=>"Renommer"])
->add('submit', SubmitType::class,["label"=>"Valider"])
->getForm();
$form->handleRequest($request);
$toclose=false;
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
if($data["subdirectory"]=="thumb"||$data["subdirectory"]=="thumbmini"||$data["subdirectory"]=="__trash") {
$form->addError(new FormError('Nom réservé, merci de choisir un autre nom'));
$this->get('session')->getFlashBag()->clear();
$request->getSession()->getFlashBag()->add("error", 'Nom réservé, merci de choisir un autre nom');
}
else {
$fs = new Filesystem();
$fulldirectory=$this->get('kernel')->getRootDir()."/../uploads/file/".$id;
if($subdirectory) $fulldirectory.="/".$subdirectory;
$urlsource= $fulldirectory."/".$oldname;
$urldestination = $fulldirectory."/".$data["subdirectory"];
if($urlsource!=$urldestination) {
if($fs->exists($urldestination)) {
$form->addError(new FormError('Ce nom existe déjà'));
$this->get('session')->getFlashBag()->clear();
$request->getSession()->getFlashBag()->add("error", 'Ce nom existe déjà');
}
elseif($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else {
$fs->rename($urlsource,$urldestination,true);
$fs->touch($urldestination);
$urlsource= $fulldirectory."/thumb/".$oldname;
$urldestination = $fulldirectory."/thumb/".$data["subdirectory"];
if($fs->exists($urlsource))
$fs->rename($urlsource,$urldestination,true);
$urlsource= $fulldirectory."/thumbmini/".$oldname;
$urldestination = $fulldirectory."/thumbmini/".$data["subdirectory"];
if($fs->exists($urlsource))
$fs->rename($urlsource,$urldestination,true);
}
$toclose=true;
}
}
}
} else $form->get('subdirectory')->setData($oldname);
return $this->render('CadolesCoreBundle:File:subdirectory.html.twig',[
'useheader' => false,
'usemenu' => false,
'usesidebar' => false,
'access' => $access,
'id' => $id,
'subdirectory' => $subdirectory,
'form' => $form->createView(),
'toclose' => $toclose,
]);
}
public function trashAction(Request $request,$access="config")
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$directory=$request->request->get('directory');
// Récupération du répertoire source et le nom du fichier
$racine=$this->get('kernel')->getRootDir()."/../uploads/file";
$directory=$request->request->get('directory');
$dirsource =$request->request->get('subdirectory');
$namesource =$request->request->get('filename');
$canupdate =$this->getPermission($access,$directory);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$fs = new Filesystem();
// Déplacer le fichier
$urlsource=$racine."/".$directory."/".$dirsource."/".$namesource;
$urldestination=$racine."/".$directory."/__trash/".$dirsource."/".$namesource;
$fs->mkdir($racine."/".$directory."/__trash/".$dirsource);
if($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else $fs->rename($urlsource,$urldestination,true);
}
// Déplacer le thumb
$fs->mkdir($racine."/".$directory."/__trash/".$dirsource."/thumb");
$urlsource=$racine."/".$directory."/".$dirsource."/thumb/".$namesource;
$urldestination=$racine."/".$directory."/__trash/".$dirsource."/thumb/".$namesource;
if($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else $fs->rename($urlsource,$urldestination,true);
}
// Déplacer le thumbmini
$fs->mkdir($racine."/".$directory."/__trash/".$dirsource."/thumbmini");
$urlsource=$racine."/".$directory."/".$dirsource."/thumbmini/".$namesource;
$urldestination=$racine."/".$directory."/__trash/".$dirsource."/thumbmini/".$namesource;
if($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else $fs->rename($urlsource,$urldestination,true);
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function restaureAction(Request $request,$access="config")
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$directory=$request->request->get('directory');
// Récupération du répertoire source et le nom du fichier
$racine=$this->get('kernel')->getRootDir()."/../uploads/file";
$directory=$request->request->get('directory');
$dirsource =$request->request->get('subdirectory');
$namesource =$request->request->get('filename');
$canupdate =$this->getPermission($access,$directory);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$fs = new Filesystem();
// Déplacer le fichier
$dirdestination=str_replace("__trash/","",$dirsource);
$urlsource=$racine."/".$directory."/".$dirsource."/".$namesource;
$urldestination=str_replace("__trash/","/",$urlsource);
$fs->mkdir($racine."/".$directory."/".$dirdestination);
if($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else $fs->rename($urlsource,$urldestination,true);
}
// Déplacer le thumb
$urlsource=$racine."/".$directory."/".$dirsource."/thumb/".$namesource;
$urldestination=str_replace("__trash/","/",$urlsource);
$fs->mkdir($racine."/".$directory."/".$dirdestination."/thumb");
if($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else $fs->rename($urlsource,$urldestination,true);
}
// Déplacer le thumbmini
$urlsource=$racine."/".$directory."/".$dirsource."/thumbmini/".$namesource;
$urldestination=str_replace("__trash/","/",$urlsource);
$fs->mkdir($racine."/".$directory."/".$dirdestination."/thumbmini");
if($fs->exists($urlsource)) {
if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else $fs->rename($urlsource,$urldestination,true);
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function purgetrashAction($directory,Request $request,$access="config")
{
$output=array();
$canupdate =$this->getPermission($access,$directory);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$fs = new Filesystem();
$url=$this->get('kernel')->getRootDir()."/../uploads/file/".$directory."/__trash";
if($fs->exists($url)) {
$fs->remove($url);
}
return $this->redirectToRoute('cadoles_core_'.$access.'_file_list',['directory'=>$directory]);
}
public function deleteAction(Request $request,$access="config") public function deleteAction(Request $request,$access="config")
{ {
// S'assurer que c'est un appel ajax // S'assurer que c'est un appel ajax
@ -247,7 +501,9 @@ class FileController extends Controller
$filename=$request->request->get('filename'); $filename=$request->request->get('filename');
if($subdirectory) $directory.="/".$subdirectory; if($subdirectory) $directory.="/".$subdirectory;
$this->getPermission($access,$directory); $canupdate =$this->getPermission($access,$directory);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$fs = new Filesystem(); $fs = new Filesystem();
$url=$this->get('kernel')->getRootDir()."/../uploads/file/".$directory."/".$filename; $url=$this->get('kernel')->getRootDir()."/../uploads/file/".$directory."/".$filename;
if($fs->exists($url)) { if($fs->exists($url)) {
@ -267,7 +523,7 @@ class FileController extends Controller
} }
$output=array(); $output=array();
$directory=$request->request->get('directory');+ $directory=$request->request->get('directory');
// Récupération du répertoire source et le nom du fichier // Récupération du répertoire source et le nom du fichier
$racine=$this->get('kernel')->getRootDir()."/../uploads/file"; $racine=$this->get('kernel')->getRootDir()."/../uploads/file";
@ -276,16 +532,22 @@ class FileController extends Controller
$dirdestination =$request->request->get('dirdestination'); $dirdestination =$request->request->get('dirdestination');
$namedestination =$request->request->get('namedestination'); $namedestination =$request->request->get('namedestination');
$destid=$request->request->get('destid');
$this->getPermission($access,$directory); $canupdate =$this->getPermission($access,$directory);
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
$fs = new Filesystem(); $fs = new Filesystem();
// Déplacer le fichier // Déplacer le fichier
$urlsource=$racine."/".$dirsource."/".$namesource; $urlsource=$racine."/".$dirsource."/".$namesource;
$urldestination=$racine."/".$dirdestination."/".$namedestination; $urldestination=$racine."/".$dirdestination."/".$namedestination;
if($fs->exists($urlsource)) { if($fs->exists($urlsource)) {
$fs->rename($urlsource,$urldestination); if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else
$fs->rename($urlsource,$urldestination, true);
} }
// Déplacer le thumb // Déplacer le thumb
@ -293,7 +555,12 @@ class FileController extends Controller
$urlsource=$racine."/".$dirsource."/thumb/".$namesource; $urlsource=$racine."/".$dirsource."/thumb/".$namesource;
$urldestination=$racine."/".$dirdestination."/thumb/".$namedestination; $urldestination=$racine."/".$dirdestination."/thumb/".$namedestination;
if($fs->exists($urlsource)) { if($fs->exists($urlsource)) {
$fs->rename($urlsource,$urldestination); if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else
$fs->rename($urlsource,$urldestination, true);
} }
// Déplacer le thumbmini // Déplacer le thumbmini
@ -301,7 +568,12 @@ class FileController extends Controller
$urlsource=$racine."/".$dirsource."/thumbmini/".$namesource; $urlsource=$racine."/".$dirsource."/thumbmini/".$namesource;
$urldestination=$racine."/".$dirdestination."/thumbmini/".$namedestination; $urldestination=$racine."/".$dirdestination."/thumbmini/".$namedestination;
if($fs->exists($urlsource)) { if($fs->exists($urlsource)) {
$fs->rename($urlsource,$urldestination); if(is_dir($urlsource)) {
$fs->mirror($urlsource,$urldestination);
$fs->remove($urlsource);
}
else
$fs->rename($urlsource,$urldestination, true);
} }
$response = new Response(json_encode($output)); $response = new Response(json_encode($output));
@ -309,6 +581,7 @@ class FileController extends Controller
return $response; return $response;
} }
public function viewAction($directory,$filename,Request $request,$access="config") public function viewAction($directory,$filename,Request $request,$access="config")
{ {
$this->getPermission($access,$directory); $this->getPermission($access,$directory);

View File

@ -139,16 +139,16 @@ class GroupController extends Controller
case 6 : case 6 :
$qb->orderBy('table.owner',$order[0]["dir"]); $qb->orderBy('table.owner',$order[0]["dir"]);
break; break;
case 7 : case 8 :
$qb->orderBy('table.fgcancreatepage',$order[0]["dir"]); $qb->orderBy('table.fgcancreatepage',$order[0]["dir"]);
break; break;
case 8 : case 9 :
$qb->orderBy('table.fgcancreatecalendar',$order[0]["dir"]); $qb->orderBy('table.fgcancreatecalendar',$order[0]["dir"]);
break; break;
case 9 : case 10 :
$qb->orderBy('table.fgcancreateblog',$order[0]["dir"]); $qb->orderBy('table.fgcancreateblog',$order[0]["dir"]);
break; break;
case 10 : case 11 :
$qb->orderBy('table.fgcancreateproject',$order[0]["dir"]); $qb->orderBy('table.fgcancreateproject',$order[0]["dir"]);
break; break;
} }
@ -175,7 +175,7 @@ class GroupController extends Controller
if(!$data->getFgall()) $action .="<a href='".$this->generateUrl('cadoles_core_config_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>"; if(!$data->getFgall()) $action .="<a href='".$this->generateUrl('cadoles_core_config_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>";
if($data->getFgcanshare()) if($data->getFgcanshare())
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-bar-chart-o fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-chart-area fa-fw fa-2x'></i></a>";
} }
else { else {
$fgproprio=($user==$data->getOwner()); $fgproprio=($user==$data->getOwner());
@ -194,11 +194,16 @@ class GroupController extends Controller
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>"; $action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>";
} }
else { else {
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_out', array('id'=>$data->getId()))."'><i class='fa fa-sign-out fa-fw fa-2x'></i></a>"; // On ne peut se désinscrire que si le groupe est ouvert et qu'il n'est pas lié à un groupe ldap ou sso
$fgcanleave=true;
if($data->getFgtemplate() or $data->getFgall()) $fgcanleave=false;
elseif(!$data->getFgcanshare() && !$data->getFgopen()) $fgcanleave=false;
elseif($data->getFgcanshare() && !$this->get('session')->get('permunsubscribe') && !$data->getFgopen()) $fgcanleave=false;
if($fgcanleave) $action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_out', array('id'=>$data->getId()))."'><i class='fa fa-sign-out-alt fa-fw fa-2x'></i></a>";
} }
if($data->getFgcanshare()) if($data->getFgcanshare())
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-bar-chart-o fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-chart-area fa-fw fa-2x'></i></a>";
} }
@ -217,6 +222,12 @@ class GroupController extends Controller
$userinfo.="<br>".$data->getOwner()->getUsername(); $userinfo.="<br>".$data->getOwner()->getUsername();
} }
$visitecpt="";
$visitelast=null;
foreach($data->getUsers() as $usergroup) {
$visitecpt+=$usergroup->getVisitecpt();
$visitelast=($usergroup->getVisitedate()>$visitelast?$usergroup->getVisitedate():$visitelast);
}
array_push($output["data"],array( array_push($output["data"],array(
@ -227,6 +238,7 @@ class GroupController extends Controller
$filtre, $filtre,
($data->getFgcanshare()?"oui":"non"), ($data->getFgcanshare()?"oui":"non"),
$userinfo, $userinfo,
($visitelast?$visitelast->format("d/m/Y H:i")."<br>":"")."nb = ".$visitecpt,
($data->getFgcancreatepage()?"oui":"non"), ($data->getFgcancreatepage()?"oui":"non"),
($data->getFgcancreatecalendar()?"oui":"non"), ($data->getFgcancreatecalendar()?"oui":"non"),
($data->getFgcancreateblog()?"oui":"non"), ($data->getFgcancreateblog()?"oui":"non"),
@ -561,7 +573,7 @@ class GroupController extends Controller
// Notification mail auprès de la personne inscrite // Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$idpage =$group->getPages()->first()->getId(); $idpage =$group->getPages()->first()->getId();
$url = $this->generateUrl('cadoles_core_home', ["id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL); $url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>"; $texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url"; $text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
@ -1010,6 +1022,61 @@ class GroupController extends Controller
]); ]);
} }
public function groupexportAction(Request $request, $access="config")
{
$em = $this->getDoctrine()->getManager();
$dir = $this->get('kernel')->getRootDir() . '/../uploads/export/';
$file = "exportgroup.csv";
$fs = new Filesystem();
$fs->mkdir($dir);
$csvh = fopen($dir.$file, 'w');
$d = ';'; // this is the default but i like to be explicit
$e = '"'; // this is the default but i like to be explicit
// Entête de colonne
$data=["id","Label","Ouvert","Groupe de Travail","Propriétaire","Date Visite","Cpt Visite","Création Page","Création Calendriers","Création Blogs","Création Projets"];
fputcsv($csvh, $data, $d, $e);
// Liste des utilisateurs en fonction du role de l'utilisateur en cours
$groups=$em->getRepository("CadolesCoreBundle:Group")->findAll();
foreach($groups as $group) {
$data = [
"id"=>$group->getId(),
"label"=>$group->getLabel(),
"fgopen"=>($group->getFgopen()?"oui":"non"),
"fgcanshare"=>($group->getFgcanshare()?"oui":"non"),
"owner"=>($group->getOwner()?$group->getOwner()->getUsername():""),
"visitedate"=>"",
"visitecpt"=>"",
"fgcancreatepage"=>($group->getFgcancreatepage()?"oui":"non"),
"fgcancreatecalendar"=>($group->getFgcancreatecalendar()?"oui":"non"),
"fgcancreateblog"=>($group->getFgcancreateblog()?"oui":"non"),
"fgcancreateproject"=>($group->getFgcancreateproject()?"oui":"non"),
];
$visitecpt="";
$visitelast=null;
foreach($group->getUsers() as $usergroup) {
$visitecpt+=$usergroup->getVisitecpt();
$visitelast=($usergroup->getVisitedate()>$visitelast?$usergroup->getVisitedate():$visitelast);
}
$data["visitedate"]=($visitelast?$visitelast->format("d/m/Y H:i"):"");
$data["visitecpt"]=$visitecpt;
fputcsv($csvh, $data, $d, $e);
}
fclose($csvh);
$response = new BinaryFileResponse($dir.$file);
$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT);
return $response;
}
public function usergroupexportAction($id,Request $request, $access="config") public function usergroupexportAction($id,Request $request, $access="config")
{ {
// Récupération de l'enregistrement courant // Récupération de l'enregistrement courant
@ -1131,6 +1198,46 @@ class GroupController extends Controller
]); ]);
} }
public function invitationAction($id,Request $request, $access="config")
{
// Récupération de l'enregistrement courant
$em = $this->getDoctrine()->getManager();
$group=$this->getData($id);
$this->canManager($group,$access);
$invitations=$group->getInvitations();
if(!is_array($invitations)) $invitations=[];
foreach($invitations as $key => $mail) {
$user=$em->getRepository("CadolesCoreBundle:User")->findOneBy(["email"=>$mail]);
// Si l'utilisateur est inscript plus la peine de le suivre
if($user) {
$listinvitations[$key]=["email"=>$mail,"statut"=>"","relance"=>false];
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$user,"group"=>$group]);
if($usergroup)
$listinvitations[$key]["statut"]="Inscrit dans le groupe";
else
$listinvitations[$key]["statut"]="Inscrit sur ".$this->get('session')->get('appname')." mais pas dans le groupe";
}
else {
$listinvitations[$key]=["email"=>$mail,"statut"=>"Non inscrit sur ".$this->get('session')->get('appname'),"relance"=>true];
$user=$em->getRepository("CadolesCoreBundle:Registration")->findOneBy(["email"=>$mail]);
if($user) {
$listinvitations[$key]["statut"]=$user->getStatut()->getLabel();
$listinvitations[$key]["relance"]=false;
}
}
}
return $this->render('CadolesCoreBundle:Group:invitations.html.twig',[
'useheader' => false,
'usemenu' => false,
'usesidebar' => false,
'id' => $id,
'invitations' => $listinvitations,
]);
}
protected function canManager($group,$access) { protected function canManager($group,$access) {
if($access!="config") { if($access!="config") {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();

View File

@ -23,6 +23,10 @@ class MailController extends Controller
throw $this->createNotFoundException('Unable to find '.$this->labeldata); throw $this->createNotFoundException('Unable to find '.$this->labeldata);
} }
// On récupère la liste des email invités
$invitations=$group->getInvitations();
if(!is_array($invitations)) $invitations=[];
// Création du formulaire // Création du formulaire
$form = $this->createForm(MailType::class); $form = $this->createForm(MailType::class);
@ -34,7 +38,7 @@ class MailController extends Controller
// Sujet // Sujet
$url = $this->generateUrl('cadoles_core_registration',[], UrlGeneratorInterface::ABSOLUTE_URL)."?group=".$group->getId(); $url = $this->generateUrl('cadoles_core_registration',[], UrlGeneratorInterface::ABSOLUTE_URL)."?group=".$group->getId();
$message = "Bonjour,<br><br>En tant que responsable du projet <b>'".$group->getLabel()."'</b>, je vous ai invité à rejoindre cette communauté de travail<br><br>"; $message = "Bonjour,<br><br>En tant que responsable du groupe <b>'".$group->getLabel()."'</b>, je vous ai invité à rejoindre cette communauté de travail<br><br>";
$message.= "Merci de bien vouloir tout dabord vous inscrire sur <b>".$this->get('session')->get('appname')."</b> en suivant le lien suivant<br>"; $message.= "Merci de bien vouloir tout dabord vous inscrire sur <b>".$this->get('session')->get('appname')."</b> en suivant le lien suivant<br>";
$message.= "<a href='$url'>$url</a><br><br>"; $message.= "<a href='$url'>$url</a><br><br>";
$message.= "Une fois le processus d'inscription complété, vous serez automatiquement rattaché à notre groupe de travail<br><br>"; $message.= "Une fois le processus d'inscription complété, vous serez automatiquement rattaché à notre groupe de travail<br><br>";
@ -64,8 +68,15 @@ class MailController extends Controller
if($usergroup) array_push($usersin,$user); if($usergroup) array_push($usersin,$user);
else array_push($usersnotin,$user); else array_push($usersnotin,$user);
} }
else {
// On enregistre l'invitation si elle n'existe pas déjà
if(!in_array($mail,$invitations)) {
array_push($invitations,$mail);
}
}
} }
$text=$form->get("message")->getData(); $text=$form->get("message")->getData();
$subject=$form->get("subject")->getData(); $subject=$form->get("subject")->getData();
$template="template"; $template="template";
@ -78,6 +89,17 @@ class MailController extends Controller
$fromName = $this->getUser()->getFirstname()." ".$this->getUser()->getLastname(); $fromName = $this->getUser()->getFirstname()." ".$this->getUser()->getLastname();
$message = $this->container->get('cadoles.core.service.mail'); $message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $to, $from, $fromName); $message->sendEmail($template, $mail_params, $to, $from, $fromName);
// Sauvegarde des invitation
$group->setInvitations($invitations);
$em->persist($group);
$em->flush();
}
else {
$email=$request->get("email");
if($email) {
$form->get('destinataire')->setData($email);
}
} }
if($closed && (!empty($usersin)||!empty($usersnotin))) { if($closed && (!empty($usersin)||!empty($usersnotin))) {

View File

@ -509,6 +509,7 @@ class RegistrationController extends Controller
$user->setPasswordDirect($data[0]->getPassword()); $user->setPasswordDirect($data[0]->getPassword());
$user->setVisible($data[0]->getVisible()); $user->setVisible($data[0]->getVisible());
$user->setMotivation($data[0]->getMotivation()); $user->setMotivation($data[0]->getMotivation());
$user->setNote($data[0]->getNote());
$user->setNiveau01($data[0]->getNiveau01()); $user->setNiveau01($data[0]->getNiveau01());
$user->setSiren($data[0]->getNiveau01()->getSiren()); $user->setSiren($data[0]->getNiveau01()->getSiren());
@ -700,9 +701,8 @@ class RegistrationController extends Controller
public function resetpwd02Action($key,Request $request) public function resetpwd02Action($key,Request $request)
{ {
$moderegistration = $this->getParameter('moderegistration');
$masteridentity = $this->getParameter('masteridentity'); $masteridentity = $this->getParameter('masteridentity');
if($moderegistration=="none"||$masteridentity!="SQL") if($masteridentity!="SQL")
throw $this->createNotFoundException('Permission denied'); throw $this->createNotFoundException('Permission denied');
$now=new \DateTime(); $now=new \DateTime();
@ -872,7 +872,7 @@ class RegistrationController extends Controller
$niveau01=strtolower($data->getNiveau01()->getLabel()); $niveau01=strtolower($data->getNiveau01()->getLabel());
if(stripos($niveau01,"autre")===0) { if(stripos($niveau01,"autre")===0) {
if(!$data->getNiveau01other()) { if(!$data->getNiveau01other()) {
$form->addError(new FormError("Merci d'indiquer votre ".$this->getParameter("labelniveau01"))); $form->addError(new FormError("Merci de compléter le champ 'Autre ".$this->getParameter("labelniveau01")."'"));
} }
} }

View File

@ -429,11 +429,15 @@ class UserController extends Controller
// Notification mail auprès de la personne inscrite // Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel(); $idpage =$group->getPages()->first()->getId();
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
$template="template"; $template="template";
$mail_params=array( $mail_params=array(
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(), "subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
"body_html"=>nl2br($text), "body_html"=>$texthtml,
"body_text"=>$text "body_text"=>$text
); );
$to = $data->getEmail(); $to = $data->getEmail();
@ -575,11 +579,15 @@ class UserController extends Controller
// Notification mail auprès de la personne inscrite // Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) { if($group->getFgcanshare()) {
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel(); $idpage =$group->getPages()->first()->getId();
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
$template="template"; $template="template";
$mail_params=array( $mail_params=array(
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(), "subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
"body_html"=>nl2br($text), "body_html"=>$texthtml,
"body_text"=>$text "body_text"=>$text
); );
$to = $data->getEmail(); $to = $data->getEmail();
@ -910,7 +918,7 @@ class UserController extends Controller
public function exportuserAction(Request $request) { public function exportuserAction(Request $request) {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$dir = $this->get('kernel')->getRootDir() . '/../uploads/export/'; $dir = $this->get('kernel')->getRootDir() . '/../uploads/export/';
$file = "export.csv"; $file = "exportuser.csv";
$fs = new Filesystem(); $fs = new Filesystem();
$fs->mkdir($dir); $fs->mkdir($dir);
@ -920,7 +928,7 @@ class UserController extends Controller
$e = '"'; // this is the default but i like to be explicit $e = '"'; // this is the default but i like to be explicit
// Entête de colonne // Entête de colonne
$data=["id","Login","Nom","Prénom","Email","Téléphone",$this->getParameter("labelniveau01"),$this->getParameter("labelniveau02"),"Métier","Fonction","Nom Usage","Autres Prénom","Sexe","Adresse","Date Naissance","Pays Naissance","Ville Naissance"]; $data=["id","Login","Nom","Prénom","Email","Téléphone",$this->getParameter("labelniveau01"),$this->getParameter("labelniveau02"),"Métier","Fonction","Nom Usage","Autres Prénom","Sexe","Adresse","Date Naissance","Pays Naissance","Ville Naissance","Date Visite","Cpt Visite","Groupes"];
fputcsv($csvh, $data, $d, $e); fputcsv($csvh, $data, $d, $e);
// Liste des utilisateurs en fonction du role de l'utilisateur en cours // Liste des utilisateurs en fonction du role de l'utilisateur en cours
@ -942,6 +950,17 @@ class UserController extends Controller
} }
foreach($users as $user) { foreach($users as $user) {
$groups="";
$fgfirst=true;
foreach($user->getGroups() as $key => $usergroup) {
if(!$fgfirst) $groups.=" - ";
$groups.=$usergroup->getGroup()->getLabel();
if($fgfirst) $fgfirst=false;
}
$visite = ($user->getVisitedate()?$user->getVisitedate()->format("d/m/Y H:i"):"");
$cptvisite = ($user->getVisitedate()?$user->getVisitecpt():"");
$data = [ $data = [
"id"=>$user->getId(), "id"=>$user->getId(),
"username"=>$user->getUsername(), "username"=>$user->getUsername(),
@ -960,6 +979,9 @@ class UserController extends Controller
"birthdate"=>($user->getBirthdate()?$user->getBirthdate()->format("d/m/Y"):""), "birthdate"=>($user->getBirthdate()?$user->getBirthdate()->format("d/m/Y"):""),
"birthcountry"=>($user->getBirthcountry()?$user->getBirthcountry()->getLabel():""), "birthcountry"=>($user->getBirthcountry()?$user->getBirthcountry()->getLabel():""),
"birthplace"=>($user->getBirthplace()?$user->getBirthplace()->getLabel():""), "birthplace"=>($user->getBirthplace()?$user->getBirthplace()->getLabel():""),
"visite"=>$visite,
"cptvisite"=>$cptvisite,
"groups"=>$groups,
]; ];
@ -1461,7 +1483,7 @@ class UserController extends Controller
$niveau01=strtolower($data->getNiveau01()->getLabel()); $niveau01=strtolower($data->getNiveau01()->getLabel());
if(stripos($niveau01,"autre")===0) { if(stripos($niveau01,"autre")===0) {
if(!$data->getNiveau01other()) { if(!$data->getNiveau01other()) {
$form->addError(new FormError("Merci d'indiquer votre ".$this->getParameter("labelniveau01"))); $form->addError(new FormError("Merci de compléter le champ 'Autre ".$this->getParameter("labelniveau01")."'"));
} }
} }
} }

View File

@ -207,6 +207,25 @@ class WhitelistController extends Controller
]); ]);
} }
public function ajaxiswhitelistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$email=$request->request->get('email');
$email=explode("@",$email);
$domaine=end($email);
// Rechercher le mail dans la liste blanche
$em = $this->getDoctrine()->getManager();
$whitelist=$em->getRepository($this->labelentity)->findOneBy(["label"=>$domaine]);
if($whitelist)
return new Response("OK", 200);
else
return new Response("KO", 200);
}
protected function getDatas() protected function getDatas()
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();

View File

@ -103,6 +103,11 @@ class Group
*/ */
private $idonlyoffice; private $idonlyoffice;
/**
* @ORM\Column(name="invitations", type="array", nullable=true)
*/
private $invitations;
/** /**
* @ORM\ManyToOne(targetEntity="Cadoles\PortalBundle\Entity\Icon", inversedBy="groups") * @ORM\ManyToOne(targetEntity="Cadoles\PortalBundle\Entity\Icon", inversedBy="groups")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL") * @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
@ -1085,4 +1090,28 @@ class Group
{ {
return $this->email; return $this->email;
} }
/**
* Set invitations
*
* @param array $invitations
*
* @return Group
*/
public function setInvitations($invitations)
{
$this->invitations = $invitations;
return $this;
}
/**
* Get invitations
*
* @return array
*/
public function getInvitations()
{
return $this->invitations;
}
} }

View File

@ -143,6 +143,11 @@ class Registration implements UserInterface, \Serializable
*/ */
private $motivation; private $motivation;
/**
* @ORM\Column(name="note", type="text", nullable=true)
*/
private $note;
/** /**
* @ORM\Column(type="integer", length=60, nullable=true) * @ORM\Column(type="integer", length=60, nullable=true)
*/ */
@ -840,4 +845,28 @@ class Registration implements UserInterface, \Serializable
{ {
return $this->passwordad; return $this->passwordad;
} }
/**
* Set note
*
* @param string $note
*
* @return Registration
*/
public function setNote($note)
{
$this->note = $note;
return $this;
}
/**
* Get note
*
* @return string
*/
public function getNote()
{
return $this->note;
}
} }

View File

@ -195,7 +195,12 @@ class User implements UserInterface, \Serializable
* @ORM\Column(name="motivation", type="text", nullable=true) * @ORM\Column(name="motivation", type="text", nullable=true)
*/ */
private $motivation; private $motivation;
/**
* @ORM\Column(name="note", type="text", nullable=true)
*/
private $note;
/** /**
* @ORM\Column(name="preference", type="array", nullable=true) * @ORM\Column(name="preference", type="array", nullable=true)
*/ */
@ -2059,4 +2064,28 @@ class User implements UserInterface, \Serializable
{ {
return $this->passwordad; return $this->passwordad;
} }
/**
* Set note
*
* @param string $note
*
* @return User
*/
public function setNote($note)
{
$this->note = $note;
return $this;
}
/**
* Get note
*
* @return string
*/
public function getNote()
{
return $this->note;
}
} }

View File

@ -45,6 +45,15 @@ class RegistrationType extends AbstractType
"attr" => array("class" => "btn btn-success") "attr" => array("class" => "btn btn-success")
) )
); );
$builder->add('note',
TextareaType::class, array(
"label" => "Notes Administrateur",
"required" => false,
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
)
);
} }
# Obligatoire # Obligatoire
@ -87,7 +96,7 @@ class RegistrationType extends AbstractType
$builder->add('niveau01other', $builder->add('niveau01other',
TextType::class, array( TextType::class, array(
"label" =>"Autre ".$session->get('labelniveau01'), "label" =>"Autre ".$session->get('labelniveau01'). " *",
"disabled" => ($options["mode"]=="delete"?true:false), "disabled" => ($options["mode"]=="delete"?true:false),
"required" => false, "required" => false,
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px") "attr" => array("class" => "form-control", "style" => "margin-bottom:15px")

View File

@ -85,7 +85,16 @@ class UserType extends AbstractType
"required" => false, "required" => false,
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px;$readonly","onfocus" => $onfocus, "onchange" => $onchange), "attr" => array("class" => "form-control", "style" => "margin-bottom:15px;$readonly","onfocus" => $onfocus, "onchange" => $onchange),
] ]
); );
$builder->add('note',
TextareaType::class, array(
"label" => "Notes Administrateur",
"required" => false,
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
)
);
} }
$perm=$options["perm"]; $perm=$options["perm"];

View File

@ -74,6 +74,22 @@ cadoles_core_config_file_subdirectory:
path: /config/file/subdirectory/{id}/{type} path: /config/file/subdirectory/{id}/{type}
defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: config } defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: config }
cadoles_core_config_file_rename:
path: /config/file/rename/{id}/{oldname}
defaults: { _controller: CadolesCoreBundle:File:rename, access: config }
cadoles_core_config_file_trash:
path: /config/file/trash/
defaults: { _controller: CadolesCoreBundle:File:trash, access: config }
cadoles_core_config_file_restaure:
path: /config/file/restaure/
defaults: { _controller: CadolesCoreBundle:File:restaure, access: config }
cadoles_core_config_file_purgetrash:
path: /config/file/purgetrash/{directory}
defaults: { _controller: CadolesCoreBundle:File:purgetrash, access: config }
cadoles_core_config_file_delete: cadoles_core_config_file_delete:
path: /config/file/delete/ path: /config/file/delete/
defaults: { _controller: CadolesCoreBundle:File:delete, access: config } defaults: { _controller: CadolesCoreBundle:File:delete, access: config }
@ -107,6 +123,22 @@ cadoles_core_user_file_subdirectory:
path: /user/file/subdirectory/{id}/{type} path: /user/file/subdirectory/{id}/{type}
defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: user } defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: user }
cadoles_core_user_file_rename:
path: /user/file/rename/{id}/{oldname}
defaults: { _controller: CadolesCoreBundle:File:rename, access: user }
cadoles_core_user_file_trash:
path: /user/file/trash/
defaults: { _controller: CadolesCoreBundle:File:trash, access: user }
cadoles_core_user_file_restaure:
path: /user/file/restaure/
defaults: { _controller: CadolesCoreBundle:File:restaure, access: user }
cadoles_core_user_file_purgetrash:
path: /user/file/purgetrash/{directory}
defaults: { _controller: CadolesCoreBundle:File:purgetrash, access: user }
cadoles_core_user_file_delete: cadoles_core_user_file_delete:
path: /user/file/delete path: /user/file/delete
defaults: { _controller: CadolesCoreBundle:File:delete, access: user } defaults: { _controller: CadolesCoreBundle:File:delete, access: user }
@ -128,6 +160,7 @@ cadoles_core_user_file_show:
defaults: { _controller: CadolesCoreBundle:File:show, access: user } defaults: { _controller: CadolesCoreBundle:File:show, access: user }
#== Ajax ================================================================================================================= #== Ajax =================================================================================================================
cadoles_core_ajax_country_list: cadoles_core_ajax_country_list:
path: /ajax/country/list path: /ajax/country/list
@ -161,6 +194,10 @@ cadoles_core_ajax_item_list:
path: /ajax/item/list path: /ajax/item/list
defaults: { _controller: CadolesCoreBundle:Ajax:itemlist } defaults: { _controller: CadolesCoreBundle:Ajax:itemlist }
cadoles_core_ajax_iswhitelist:
path: /ajax/iswhitelist
defaults: { _controller: CadolesCoreBundle:Whitelist:ajaxiswhitelist }
#== Home Config ========================================================================================================== #== Home Config ==========================================================================================================
cadoles_core_config: cadoles_core_config:
path: /config/home path: /config/home
@ -461,10 +498,18 @@ cadoles_core_config_group_ajax_switchmanager:
path: /config/group/ajax/switchmanager path: /config/group/ajax/switchmanager
defaults: { _controller: CadolesCoreBundle:Group:switchmanager, access: config } defaults: { _controller: CadolesCoreBundle:Group:switchmanager, access: config }
cadoles_core_config_group_export:
path: /config/group/export
defaults: { _controller: CadolesCoreBundle:Group:groupexport }
cadoles_core_config_group_usergroup_export: cadoles_core_config_group_usergroup_export:
path: /config/group/users/export/{id} path: /config/group/users/export/{id}
defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: config } defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: config }
cadoles_core_config_group_invitation:
path: /config/group/invitation/{id}
defaults: { _controller: CadolesCoreBundle:Group:invitation, access: config }
#-- Access user #-- Access user
cadoles_core_user_group: cadoles_core_user_group:
path: /user/group path: /user/group
@ -522,6 +567,10 @@ cadoles_core_user_group_usergroup_export:
path: /user/group/users/export/{id} path: /user/group/users/export/{id}
defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: user } defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: user }
cadoles_core_user_group_invitation:
path: /user/group/invitation/{id}
defaults: { _controller: CadolesCoreBundle:Group:invitation, access: user }
#== Whitelist ============================================================================================================ #== Whitelist ============================================================================================================
cadoles_core_config_whitelist: cadoles_core_config_whitelist:

View File

@ -0,0 +1,12 @@
/* jQuery UI Datepicker moving pixels fix */
table.ui-datepicker-calendar {border-collapse: separate;}
.ui-datepicker-calendar td {border: 1px solid transparent;}
/* jQuery UI Datepicker hide datepicker helper */
#ui-datepicker-div {display:none;}
/* jQuery UI Datepicker emphasis on selected dates */
.ui-datepicker .ui-datepicker-calendar .ui-state-highlight a {
background: #743620 none;
color: white;
}

View File

@ -381,6 +381,15 @@ a.item-update {
z-index: 1000; z-index: 1000;
} }
a.item-restaure {
display: none;
position: absolute;
right: 25px;
top: 2px;
z-index: 1000;
}
a.item-delete { a.item-delete {
display: none; display: none;
position: absolute; position: absolute;

View File

@ -0,0 +1,498 @@
/*
* MultiDatesPicker v1.6.4
* http://multidatespickr.sourceforge.net/
*
* Copyright 2014, Luca Lauretta
* Dual licensed under the MIT or GPL version 2 licenses.
*/
(function( $ ){
$.extend($.ui, { multiDatesPicker: { version: "1.6.4" } });
$.fn.multiDatesPicker = function(method) {
var mdp_arguments = arguments;
var ret = this;
var today_date = new Date();
var day_zero = new Date(0);
var mdp_events = {};
function removeDate(date, type) {
if(!type) type = 'picked';
date = dateConvert.call(this, date);
for(var i = 0; i < this.multiDatesPicker.dates[type].length; i++)
if(!methods.compareDates(this.multiDatesPicker.dates[type][i], date))
return this.multiDatesPicker.dates[type].splice(i, 1).pop();
}
function removeIndex(index, type) {
if(!type) type = 'picked';
return this.multiDatesPicker.dates[type].splice(index, 1).pop();
}
function addDate(date, type, no_sort) {
if(!type) type = 'picked';
date = dateConvert.call(this, date);
// @todo: use jQuery UI datepicker method instead
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
if (methods.gotDate.call(this, date, type) === false) {
this.multiDatesPicker.dates[type].push(date);
if(!no_sort) this.multiDatesPicker.dates[type].sort(methods.compareDates);
}
}
function sortDates(type) {
if(!type) type = 'picked';
this.multiDatesPicker.dates[type].sort(methods.compareDates);
}
function dateConvert(date, desired_type, date_format) {
if(!desired_type) desired_type = 'object';/*
if(!date_format && (typeof date == 'string')) {
date_format = $(this).datepicker('option', 'dateFormat');
if(!date_format) date_format = $.datepicker._defaults.dateFormat;
}
*/
return methods.dateConvert.call(this, date, desired_type, date_format);
}
var methods = {
init : function( options ) {
var $this = $(this);
this.multiDatesPicker.changed = false;
var mdp_events = {
beforeShow: function(input, inst) {
this.multiDatesPicker.changed = false;
if(this.multiDatesPicker.originalBeforeShow)
this.multiDatesPicker.originalBeforeShow.call(this, input, inst);
},
onSelect : function(dateText, inst) {
var $this = $(this);
this.multiDatesPicker.changed = true;
if (dateText) {
$this.multiDatesPicker('toggleDate', dateText);
this.multiDatesPicker.changed = true;
// @todo: this will be optimized when I'll move methods to the singleton.
}
if (this.multiDatesPicker.mode == 'normal' && this.multiDatesPicker.pickableRange) {
if(this.multiDatesPicker.dates.picked.length > 0) {
var min_date = this.multiDatesPicker.dates.picked[0],
max_date = new Date(min_date.getTime());
methods.sumDays(max_date, this.multiDatesPicker.pickableRange-1);
// counts the number of disabled dates in the range
if(this.multiDatesPicker.adjustRangeToDisabled) {
var c_disabled,
disabled = this.multiDatesPicker.dates.disabled.slice(0);
do {
c_disabled = 0;
for(var i = 0; i < disabled.length; i++) {
if(disabled[i].getTime() <= max_date.getTime()) {
if((min_date.getTime() <= disabled[i].getTime()) && (disabled[i].getTime() <= max_date.getTime()) ) {
c_disabled++;
}
disabled.splice(i, 1);
i--;
}
}
max_date.setDate(max_date.getDate() + c_disabled);
} while(c_disabled != 0);
}
if(this.multiDatesPicker.maxDate && (max_date > this.multiDatesPicker.maxDate))
max_date = this.multiDatesPicker.maxDate;
$this
.datepicker("option", "minDate", min_date)
.datepicker("option", "maxDate", max_date);
} else {
$this
.datepicker("option", "minDate", this.multiDatesPicker.minDate)
.datepicker("option", "maxDate", this.multiDatesPicker.maxDate);
}
}
if(this.multiDatesPicker.originalOnSelect && dateText)
this.multiDatesPicker.originalOnSelect.call(this, dateText, inst);
},
beforeShowDay : function(date) {
var $this = $(this),
gotThisDate = $this.multiDatesPicker('gotDate', date) !== false,
isDisabledCalendar = $this.datepicker('option', 'disabled'),
isDisabledDate = $this.multiDatesPicker('gotDate', date, 'disabled') !== false,
areAllSelected = this.multiDatesPicker.maxPicks <= this.multiDatesPicker.dates.picked.length;
var bsdReturn = [true, '', null];
if(this.multiDatesPicker.originalBeforeShowDay)
bsdReturn = this.multiDatesPicker.originalBeforeShowDay.call(this, date);
bsdReturn[1] = gotThisDate ? 'ui-state-highlight '+bsdReturn[1] : bsdReturn[1];
bsdReturn[0] = bsdReturn[0] && !(isDisabledCalendar || isDisabledDate || (areAllSelected && !bsdReturn[1]));
return bsdReturn;
}
};
// value have to be extracted before datepicker is initiated
if($this.val()) var inputDates = $this.val()
if(options) {
// value have to be extracted before datepicker is initiated
//if(options.altField) var inputDates = $(options.altField).val();
if(options.separator) this.multiDatesPicker.separator = options.separator;
if(!this.multiDatesPicker.separator) this.multiDatesPicker.separator = ', ';
this.multiDatesPicker.originalBeforeShow = options.beforeShow;
this.multiDatesPicker.originalOnSelect = options.onSelect;
this.multiDatesPicker.originalBeforeShowDay = options.beforeShowDay;
this.multiDatesPicker.originalOnClose = options.onClose;
// datepicker init
$this.datepicker(options);
this.multiDatesPicker.minDate = $.datepicker._determineDate(this, options.minDate, null);
this.multiDatesPicker.maxDate = $.datepicker._determineDate(this, options.maxDate, null);
if(options.addDates) methods.addDates.call(this, options.addDates);
if(options.addDisabledDates)
methods.addDates.call(this, options.addDisabledDates, 'disabled');
methods.setMode.call(this, options);
} else {
$this.datepicker();
}
$this.datepicker('option', mdp_events);
// adds any dates found in the input or alt field
if(inputDates) $this.multiDatesPicker('value', inputDates);
// generates the new string of added dates
var inputs_values = $this.multiDatesPicker('value');
// fills the input field back with all the dates in the calendar
$this.val(inputs_values);
// Fixes the altField filled with defaultDate by default
var altFieldOption = $this.datepicker('option', 'altField');
if (altFieldOption) $(altFieldOption).val(inputs_values);
// Updates the calendar view
$this.datepicker('refresh');
},
compareDates : function(date1, date2) {
date1 = dateConvert.call(this, date1);
date2 = dateConvert.call(this, date2);
// return > 0 means date1 is later than date2
// return == 0 means date1 is the same day as date2
// return < 0 means date1 is earlier than date2
var diff = date1.getFullYear() - date2.getFullYear();
if(!diff) {
diff = date1.getMonth() - date2.getMonth();
if(!diff)
diff = date1.getDate() - date2.getDate();
}
return diff;
},
sumDays : function( date, n_days ) {
var origDateType = typeof date;
obj_date = dateConvert.call(this, date);
obj_date.setDate(obj_date.getDate() + n_days);
return dateConvert.call(this, obj_date, origDateType);
},
dateConvert : function( date, desired_format, dateFormat ) {
var from_format = typeof date;
var $this = $(this);
if(from_format == desired_format) {
if(from_format == 'object') {
try {
date.getTime();
} catch (e) {
$.error('Received date is in a non supported format!');
return false;
}
}
return date;
}
if(typeof date == 'undefined') date = new Date(0);
if(desired_format != 'string' && desired_format != 'object' && desired_format != 'number')
$.error('Date format "'+ desired_format +'" not supported!');
if(!dateFormat) {
// thanks to bibendus83 -> http://sourceforge.net/tracker/index.php?func=detail&aid=3213174&group_id=358205&atid=1495382
var dp_dateFormat = $this.datepicker('option', 'dateFormat');
if (dp_dateFormat) {
dateFormat = dp_dateFormat;
} else {
dateFormat = $.datepicker._defaults.dateFormat;
}
}
// converts to object as a neutral format
switch(from_format) {
case 'object': break;
case 'string': date = $.datepicker.parseDate(dateFormat, date); break;
case 'number': date = new Date(date); break;
default: $.error('Conversion from "'+ desired_format +'" format not allowed on jQuery.multiDatesPicker');
}
// then converts to the desired format
switch(desired_format) {
case 'object': return date;
case 'string': return $.datepicker.formatDate(dateFormat, date);
case 'number': return date.getTime();
default: $.error('Conversion to "'+ desired_format +'" format not allowed on jQuery.multiDatesPicker');
}
return false;
},
gotDate : function( date, type ) {
if(!type) type = 'picked';
for(var i = 0; i < this.multiDatesPicker.dates[type].length; i++) {
if(methods.compareDates.call(this, this.multiDatesPicker.dates[type][i], date) === 0) {
return i;
}
}
return false;
},
value : function( value ) {
if(value && typeof value == 'string') {
methods.addDates.call(this, value.split(this.multiDatesPicker.separator));
} else {
var dates = methods.getDates.call(this, 'string');
return dates.length
? dates.join(this.multiDatesPicker.separator)
: "";
}
},
getDates : function( format, type ) {
if(!format) format = 'string';
if(!type) type = 'picked';
switch (format) {
case 'object':
return this.multiDatesPicker.dates[type];
case 'string':
case 'number':
var o_dates = new Array();
for(var i in this.multiDatesPicker.dates[type])
o_dates.push(
dateConvert.call(
this,
this.multiDatesPicker.dates[type][i],
format
)
);
return o_dates;
default: $.error('Format "'+format+'" not supported!');
}
},
addDates : function( dates, type ) {
if(dates.length > 0) {
if(!type) type = 'picked';
switch(typeof dates) {
case 'object':
case 'array':
if(dates.length) {
for(var i = 0; i < dates.length; i++)
addDate.call(this, dates[i], type, true);
sortDates.call(this, type);
break;
} // else does the same as 'string'
case 'string':
case 'number':
addDate.call(this, dates, type);
break;
default:
$.error('Date format "'+ typeof dates +'" not allowed on jQuery.multiDatesPicker');
}
//$(this).datepicker('refresh');
} else {
$.error('Empty array of dates received.');
}
},
removeDates : function( dates, type ) {
if(!type) type = 'picked';
var removed = [];
if (Object.prototype.toString.call(dates) === '[object Array]') {
for(var i in dates.sort(function(a,b){return b-a})) {
removed.push(removeDate.call(this, dates[i], type));
}
} else {
removed.push(removeDate.call(this, dates, type));
}
return removed;
},
removeIndexes : function( indexes, type ) {
if(!type) type = 'picked';
var removed = [];
if (Object.prototype.toString.call(indexes) === '[object Array]') {
for(var i in indexes.sort(function(a,b){return b-a})) {
removed.push(removeIndex.call(this, indexes[i], type));
}
} else {
removed.push(removeIndex.call(this, indexes, type));
}
return removed;
},
resetDates : function ( type ) {
if(!type) type = 'picked';
this.multiDatesPicker.dates[type] = [];
},
toggleDate : function( date, type ) {
if(!type) type = 'picked';
switch(this.multiDatesPicker.mode) {
case 'daysRange':
this.multiDatesPicker.dates[type] = []; // deletes all picked/disabled dates
var end = this.multiDatesPicker.autoselectRange[1];
var begin = this.multiDatesPicker.autoselectRange[0];
if(end < begin) { // switch
end = this.multiDatesPicker.autoselectRange[0];
begin = this.multiDatesPicker.autoselectRange[1];
}
for(var i = begin; i < end; i++)
methods.addDates.call(this, methods.sumDays.call(this,date, i), type);
break;
default:
if(methods.gotDate.call(this, date) === false) // adds dates
methods.addDates.call(this, date, type);
else // removes dates
methods.removeDates.call(this, date, type);
break;
}
},
setMode : function( options ) {
var $this = $(this);
if(options.mode) this.multiDatesPicker.mode = options.mode;
switch(this.multiDatesPicker.mode) {
case 'normal':
for(option in options)
switch(option) {
case 'maxPicks':
case 'minPicks':
case 'pickableRange':
case 'adjustRangeToDisabled':
this.multiDatesPicker[option] = options[option];
break;
//default: $.error('Option ' + option + ' ignored for mode "'.options.mode.'".');
}
break;
case 'daysRange':
case 'weeksRange':
var mandatory = 1;
for(option in options)
switch(option) {
case 'autoselectRange':
mandatory--;
case 'pickableRange':
case 'adjustRangeToDisabled':
this.multiDatesPicker[option] = options[option];
break;
//default: $.error('Option ' + option + ' does not exist for setMode on jQuery.multiDatesPicker');
}
if(mandatory > 0) $.error('Some mandatory options not specified!');
break;
}
/*
if(options.pickableRange) {
$this.datepicker("option", "maxDate", options.pickableRange);
$this.datepicker("option", "minDate", this.multiDatesPicker.minDate);
}
*/
if(mdp_events.onSelect)
mdp_events.onSelect();
},
destroy: function(){
this.multiDatesPicker = null;
$(this).datepicker('destroy');
}
};
this.each(function() {
var $this = $(this);
if (!this.multiDatesPicker) {
this.multiDatesPicker = {
dates: {
picked: [],
disabled: []
},
mode: 'normal',
adjustRangeToDisabled: true
};
}
if(methods[method]) {
var exec_result = methods[method].apply(this, Array.prototype.slice.call(mdp_arguments, 1));
switch(method) {
case 'removeDates':
case 'removeIndexes':
case 'resetDates':
case 'toggleDate':
case 'addDates':
var altField = $this.datepicker('option', 'altField');
// @todo: should use altFormat for altField
var dates_string = methods.value.call(this);
if (altField !== undefined && altField != "") {
$(altField).val(dates_string);
}
$this.val(dates_string);
$.datepicker._refreshDatepicker(this);
}
switch(method) {
case 'removeDates':
case 'getDates':
case 'gotDate':
case 'sumDays':
case 'compareDates':
case 'dateConvert':
case 'value':
ret = exec_result;
}
return exec_result;
} else if( typeof method === 'object' || ! method ) {
return methods.init.apply(this, mdp_arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.multiDatesPicker');
}
return false;
});
return ret;
};
var PROP_NAME = 'multiDatesPicker';
var dpuuid = new Date().getTime();
var instActive;
$.multiDatesPicker = {version: false};
//$.multiDatesPicker = new MultiDatesPicker(); // singleton instance
$.multiDatesPicker.initialized = false;
$.multiDatesPicker.uuid = new Date().getTime();
$.multiDatesPicker.version = $.ui.multiDatesPicker.version;
// allows MDP not to hide everytime a date is picked
$.multiDatesPicker._hideDatepicker = $.datepicker._hideDatepicker;
$.datepicker._hideDatepicker = function(){
var target = this._curInst.input[0];
var mdp = target.multiDatesPicker;
if(!mdp || (this._curInst.inline === false && !mdp.changed)) {
return $.multiDatesPicker._hideDatepicker.apply(this, arguments);
} else {
mdp.changed = false;
$.datepicker._refreshDatepicker(target);
return;
}
};
// Workaround for #4055
// Add another global to avoid noConflict issues with inline event handlers
window['DP_jQuery_' + dpuuid] = $;
})( jQuery );

View File

@ -17,6 +17,7 @@
<th width="90px">Action</th> <th width="90px">Action</th>
<th width="70px">Ordre</th> <th width="70px">Ordre</th>
<th width="200px">Clé</th> <th width="200px">Clé</th>
<th>Description</th>
<th>Valeur</th> <th>Valeur</th>
</tr> </tr>
</thead> </thead>
@ -38,6 +39,7 @@
</td> </td>
<td>{{ config.order }}</td> <td>{{ config.order }}</td>
<td>{{ config.id }}</td> <td>{{ config.id }}</td>
<td>{{ config.help|raw }}</td>
<td> <td>
{% if config.type == "boolean" %} {% if config.type == "boolean" %}
{% if config.value == "0" %} {% if config.value == "0" %}

View File

@ -49,5 +49,24 @@
$(window).load(function () { $(window).load(function () {
$('#largeimg').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview }); $('#largeimg').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
var selection = new Object();
if($('#largeimg').height()<$('#largeimg').width()) {
selection.width = $('#largeimg').height();
selection.height = $('#largeimg').height();
}
else {
selection.width = $('#largeimg').width();
selection.height = $('#largeimg').width();
}
selection.x1=0;
selection.x2=0;
selection.y1=0;
selection.y2=0;
preview($('#largeimg'),selection);
}); });
{% endblock %} {% endblock %}

View File

@ -33,6 +33,10 @@
text-transform: initial !important; text-transform: initial !important;
} }
a.item-update {
right: 25px;
}
{% endblock %} {% endblock %}
@ -41,7 +45,7 @@
<div id="explorer"> <div id="explorer">
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups" style="margin-top:5px"> <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups" style="margin-top:5px">
{% if canupdate %} {% if canupdate and not fgtrash %}
<div class="btn-group mr-2" role="group" aria-label="First group"> <div class="btn-group mr-2" role="group" aria-label="First group">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Téléchargez vos Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter des fichiers"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Téléchargez vos Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter des fichiers">
<i class="fa fa-upload"></i> <i class="fa fa-upload"></i>
@ -49,7 +53,6 @@
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Création Répertoire','{{ path('cadoles_core_'~access~'_file_subdirectory',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter un Répertoire"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Création Répertoire','{{ path('cadoles_core_'~access~'_file_subdirectory',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter un Répertoire">
<i class="fa fa-folder-plus"></i> <i class="fa fa-folder-plus"></i>
</button> </button>
</div> </div>
{% endif %} {% endif %}
@ -71,23 +74,59 @@
{% endif %} {% endif %}
</a> </a>
{% set active="" %}
{% if sort=="name" %} {% if sort=="name" %}
{%set action="date" %} {% set active="active" %}
{%endif%}
{% if order=="SORT_ASC" %}
{%set action="SORT_DESC" %}
{% else %} {% else %}
{%set action="name" %} {%set action="SORT_ASC" %}
{% endif %} {% endif %}
{% if not subdirectory is empty %} {% if not subdirectory is empty %}
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':action }) }}" type="button" class="btn btn-primary"> <a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
{% else %} {% else %}
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':action }) }}" type="button" class="btn btn-primary"> <a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
{% endif %} {% endif %}
{% if sort=="name" %} {% if order=="SORT_ASC" %}
<i class="fas fa-long-arrow-alt-down"></i> Nom <i class="fas fa-long-arrow-alt-down"></i> Nom
{% else %} {% else %}
<i class="fas fa-long-arrow-alt-up"></i> Nom
{% endif %}
</a>
{% set active="" %}
{% if sort=="date" %}
{% set active="active" %}
{%endif%}
{% if order=="SORT_ASC" %}
{%set action="SORT_DESC" %}
{% else %}
{%set action="SORT_ASC" %}
{% endif %}
{% if not subdirectory is empty %}
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':'date', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
{% else %}
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':'date', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
{% endif %}
{% if order=="SORT_ASC" %}
<i class="fas fa-long-arrow-alt-down"></i> Date <i class="fas fa-long-arrow-alt-down"></i> Date
{% else %}
<i class="fas fa-long-arrow-alt-up"></i> Date
{% endif %} {% endif %}
</a> </a>
</div> </div>
{% if canupdate %}
<div class="btn-group mr-2" role="group" aria-label="Third group">
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':'__trash' }) }}" type="button" class="btn btn-primary"><i class="fas fa-trash"></i></a>
{% if fgtrash %}
<a href="{{ path('cadoles_core_'~access~'_file_purgetrash',{'directory':directory }) }}" type="button" class="btn btn-primary" data-method="delete" data-confirm="Souhaitez-vous purger votre poubelle ? Cette action sera irrévocable.">Purger la poubelle</a>
{% endif %}
</div>
{% endif %}
</div> </div>
@ -103,12 +142,14 @@
{% set datadir = datadir~'/'~sub %} {% set datadir = datadir~'/'~sub %}
{% set sub = sub~"/"~parent %} {% set sub = sub~"/"~parent %}
{% endif %} {% endif %}
<li class="brea.dcrumb-item directory" data-dir="{{datadir}}" data-name="{{ parent }}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':sub }) }}">{{parent|raw}}</a></li> {% set tmpdirname = parent|replace({'__trash': 'Poubelle'}) %}
<li class="brea.dcrumb-item directory" data-dir="{{datadir}}" data-name="{{ parent }}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':sub }) }}">{{tmpdirname|raw}}</a></li>
{% endfor %} {% endfor %}
{% if not subdirectory is empty %} {% if not subdirectory is empty %}
<li class="breadcrumb-item directory" data-dir="{{directory}}/{{sub}}" data-name="{{dirname}}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory }) }}">{{dirname|raw}}</a></li> {% set tmpdirname = dirname|replace({'__trash': 'Poubelle'}) %}
<li class="breadcrumb-item directory" data-dir="{{directory}}/{{sub}}" data-name="{{dirname}}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory }) }}">{{tmpdirname|raw}}</a></li>
{% endif %} {% endif %}
</ol> </ol>
@ -124,9 +165,23 @@
<div id="{{dir.name|e('js')|raw }}" class="grid-item grid-{{view}} directory" data-dir="{{directory}}/{{subdirectory}}" data-name="{{dir.name}}"> <div id="{{dir.name|e('js')|raw }}" class="grid-item grid-{{view}} directory" data-dir="{{directory}}/{{subdirectory}}" data-name="{{dir.name}}">
<div class="grid-item-content"> <div class="grid-item-content">
{% if canadd %} {% if canadd %}
{% if fgtrash %}
<a style="cursor:pointer;" onClick="restaureFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-restaure">
<i class="fa fa-undo" title="Restaurer le fichier"></i>
</a>
<a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete"> <a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
<i class="fa fa-trash" title="Supprimer le dossier"></i> <i class="fa fa-trash" title="Supprimer le dossier"></i>
</a> </a>
{% else %}
<a style="cursor:pointer;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Modification Répertoire','{{ path('cadoles_core_'~access~'_file_rename',{'id': directory,'subdirectory':subdirectory,'oldname':dir.name}) }}');" class="item-update">
<i class="fa fa-file" title="Modifier le dossier"></i>
</a>
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
<i class="fa fa-trash" title="Supprimer le dossier"></i>
</a>
{% endif %}
{% endif %} {% endif %}
{% if subdirectory is empty %} {% if subdirectory is empty %}
@ -153,9 +208,23 @@
<div class="grid-item grid-{{view}} file" data-dir="{{directory}}/{{subdirectory}}" data-name="{{file.name}}"> <div class="grid-item grid-{{view}} file" data-dir="{{directory}}/{{subdirectory}}" data-name="{{file.name}}">
<div class="grid-item-content"> <div class="grid-item-content">
{% if canadd %} {% if canadd %}
{% if fgtrash %}
<a style="cursor:pointer;" onClick="restaureFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-restaure">
<i class="fa fa-undo" title="Restaurer le fichier"></i>
</a>
<a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete"> <a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
<i class="fa fa-trash" title="Supprimer le fichier"></i> <i class="fa fa-trash" title="Supprimer le fichier"></i>
</a> </a>
{% else %}
<a style="cursor:pointer;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Modification Fichier','{{ path('cadoles_core_'~access~'_file_rename',{'id': directory,'subdirectory':subdirectory,'oldname':file.name}) }}');" class="item-update">
<i class="fa fa-file" title="Modifier le fichier"></i>
</a>
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
<i class="fa fa-trash" title="Supprimer le fichier"></i>
</a>
{% endif %}
{% endif %} {% endif %}
{% if file.minefamily=="text" or file.minefamily=="image" or file.minetype == "application/pdf" %} {% if file.minefamily=="text" or file.minefamily=="image" or file.minetype == "application/pdf" %}
@ -205,8 +274,12 @@
else { else {
color = "#{{ color["main"]}}"; color = "#{{ color["main"]}}";
} }
$(".item-update").css("color",color);
$(".item-update > i").css("color",color);
$(".item-delete").css("color",color); $(".item-delete").css("color",color);
$(".item-delete > i").css("color",color); $(".item-delete > i").css("color",color);
$(".item-restaure").css("color",color);
$(".item-restaure > i").css("color",color);
$(".grid-item-title > h2").css("color",color); $(".grid-item-title > h2").css("color",color);
$('#mymodal').on('shown.bs.modal', function() { $('#mymodal').on('shown.bs.modal', function() {
@ -293,9 +366,47 @@
} }
} }
// Trasher un fichier
function trashFile(directory,subdirectory,filename) {
var r = confirm("Confirmez-vous la mise à la poubelle de ce fichier ? Vous pourrez le récupèrer si besoin.");
if (r == true) {
$.ajax({
method: "POST",
url: "{{ path('cadoles_core_'~access~'_file_trash') }}",
data: {
directory:directory,
subdirectory:subdirectory,
filename:filename
},
success: function() {
location.reload();
}
});
}
}
// Restaurer un fichier
function restaureFile(directory,subdirectory,filename) {
var r = confirm("Confirmez-vous la restauration de ce fichier ?");
if (r == true) {
$.ajax({
method: "POST",
url: "{{ path('cadoles_core_'~access~'_file_restaure') }}",
data: {
directory:directory,
subdirectory:subdirectory,
filename:filename
},
success: function() {
location.reload();
}
});
}
}
// Supprimer un fichier // Supprimer un fichier
function delFile(directory,subdirectory,filename) { function delFile(directory,subdirectory,filename) {
var r = confirm("Confirmez-vous la suppression de ce fichier ?"); var r = confirm("Confirmez-vous la suppression définitive de ce fichier ?");
if (r == true) { if (r == true) {
$.ajax({ $.ajax({
method: "POST", method: "POST",

View File

@ -23,7 +23,7 @@
init: function() { init: function() {
this.on("sending", function(file, xhr, formData) { this.on("sending", function(file, xhr, formData) {
formData.append("directory", "{{ id }}"); formData.append("directory", "{{ id }}");
formData.append("subdirectory", "{{ subdirectory }}"); formData.append("subdirectory", "{{ subdirectory|raw }}");
}); });
var totalFiles = 0; var totalFiles = 0;

View File

@ -0,0 +1,52 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
<a class="btn btn-default" onClick="closeModal()">Fermer</a>
<br><br>
<table class="table table-striped table-bordered table-hover" id="dataTablesnotin" style="width:100%">
<thead>
<tr>
<th>Action</th>
<th>Email</th>
<th>Statut</th>
</tr>
</thead>
<tbody>
{% for invitation in invitations %}
<tr>
<td>
{% if invitation.relance %}
<a style='cursor:pointer' onClick='showMail("{{invitation.email}}")'><i class='fa fa-envelope fa-fw'></i></a>
{% endif %}
</td>
<td>{{invitation.email}}</td>
<td>{{invitation.statut}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
});
function showMail(email) {
window.parent.$("#mymodal").hide();
$("#mymodal").find(".modal-title").html("INVITATION");
var url="{{ path('cadoles_core_mail_invitationgroup',{id:id,email:'xxx'}) }}";
url=url.replace('xxx',email);
window.parent.$("#mymodal").find("#framemodal").attr("src",url);
window.parent.$("#mymodal").modal().show();
}
function closeModal() {
url=window.parent.location;
window.parent.location=url;
}
{% endblock %}

View File

@ -9,17 +9,21 @@
{%endif%} {%endif%}
</h1> </h1>
<p>
{% set permgroup = app.session.get('permgroup') %} {% set permgroup = app.session.get('permgroup') %}
{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permgroup=="ROLE_MODO" or permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_USER') and permgroup=="ROLE_USER") %} {% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permgroup=="ROLE_MODO" or permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_USER') and permgroup=="ROLE_USER") %}
<p><a class="btn btn-success" href={{ path('cadoles_core_'~access~'_group_submit') }}> <a class="btn btn-success" href={{ path('cadoles_core_'~access~'_group_submit') }}>
{% if access=="config" %} {% if access=="config" %}
Ajouter Ajouter
{% else %} {% else %}
Créer un Groupe de Travail Créer un Groupe de Travail
{% endif %} {% endif %}
</a></p> </a>
{% endif %} {% endif %}
{%if access=="config" %}
<a class="btn btn-success" href={{ path('cadoles_core_config_group_export') }}>Exporter CSV</a>
{% endif %}
</p>
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
@ -39,6 +43,7 @@
{% if portal_activate %} {% if portal_activate %}
<th>Groupe de Travail</th> <th>Groupe de Travail</th>
<th class="text-center">Propriétaire</th> <th class="text-center">Propriétaire</th>
<th class="no-sort">Visite</th>
{% if access=="config" %} {% if access=="config" %}
<th>Création Pages</th> <th>Création Pages</th>
<th>Création Calendriers</th> <th>Création Calendriers</th>

View File

@ -11,6 +11,7 @@
{% if moderegistration!="none" and masteridentity=="SQL"%} {% if moderegistration!="none" and masteridentity=="SQL"%}
<a class="btn btn-primary" style="cursor:pointer" onClick="showMail();">Inviter des personnes non listées ci-dessous</a> <a class="btn btn-primary" style="cursor:pointer" onClick="showMail();">Inviter des personnes non listées ci-dessous</a>
<a class="btn btn-primary" style="cursor:pointer" onClick="showInvitations();">Suivi des Invitations</a>
{%endif%} {%endif%}
<a class="btn btn-default pull-right" href={{ path('cadoles_core_'~access~'_group_usergroup_export',{'id':group.id}) }}>Exporter CSV</a> <a class="btn btn-default pull-right" href={{ path('cadoles_core_'~access~'_group_usergroup_export',{'id':group.id}) }}>Exporter CSV</a>
<br><br> <br><br>
@ -168,4 +169,11 @@
$("#mymodal").find("#framemodal").attr("src",url); $("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal().show(); $("#mymodal").modal().show();
} }
function showInvitations() {
$("#mymodal").find(".modal-title").html("SUVI DES INVITATIONS");
var url="{{ path('cadoles_core_'~access~'_group_invitation',{id:group.id}) }}";
$("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal().show();
}
{% endblock %} {% endblock %}

View File

@ -217,6 +217,7 @@
$( ".grid-item-content").hover(function() { $( ".grid-item-content").hover(function() {
$(this).children(".item-heart").show(); $(this).children(".item-heart").show();
$(this).children(".item-delete").show(); $(this).children(".item-delete").show();
$(this).children(".item-restaure").show();
$(this).children(".item-update").show(); $(this).children(".item-update").show();
$(this).children(".item-preview").show(); $(this).children(".item-preview").show();
}); });
@ -224,6 +225,7 @@
$( ".grid-item-content" ).mouseleave(function() { $( ".grid-item-content" ).mouseleave(function() {
$(this).children(".item-heart").hide(); $(this).children(".item-heart").hide();
$(this).children(".item-delete").hide(); $(this).children(".item-delete").hide();
$(this).children(".item-restaure").hide();
$(this).children(".item-update").hide(); $(this).children(".item-update").hide();
$(this).children(".item-preview").hide(); $(this).children(".item-preview").hide();
}); });

View File

@ -21,7 +21,11 @@
{% endif %} {% endif %}
{% if mode!="submit" %} {% if mode!="submit" %}
{% if mode=="send" %} {{ form_widget(form.save) }} {%endif%} {% if mode=="send" %}
{{ form_widget(form.save) }}
<a class="btn btn-default" href="mailto:{{registration.email}}?subject= {{app.session.get('appname')}} : à propos de votre inscription">Envoyer un mail</a>
{%endif%}
<a class="btn btn-default" href={{ path('cadoles_core_config_registration') }}>Annuler</a> <a class="btn btn-default" href={{ path('cadoles_core_config_registration') }}>Annuler</a>
{% endif %} {% endif %}
@ -56,6 +60,19 @@
{% endif %} {% endif %}
<div class="row"> <div class="row">
{% if mode=="send" %}
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-key fa-fw"></i> Notes Administrateur
</div>
<div class="panel-body">
{{ form_widget(form.note) }}
</div>
</div>
</div>
{%endif%}
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
@ -90,7 +107,14 @@
<div class="panel-body"> <div class="panel-body">
{% if form.firstname is defined %} {{ form_row(form.firstname) }} {% endif %} {% if form.firstname is defined %} {{ form_row(form.firstname) }} {% endif %}
{{ form_row(form.lastname) }} {{ form_row(form.lastname) }}
{% if form.email is defined %} {{ form_row(form.email) }} {% endif %} {% if form.email is defined %}
{{ form_row(form.email) }}
<div class='alert alert-info alert-email' style='display:none; font-size: 80%;padding: 5px;margin-top: -10px;'>
Attention, le suffixe de votre adresse mail nest pas dans la liste des administrations autorisées.<br>
Merci de bien vouloir privilégier votre adresse professionnelle si vous en avez une.<br>
Si ce nest pas le cas, il faut que vous renseigniez la case motivation de votre demande.
</div>
{% endif %}
{% if form.visible is defined %} {{ form_row(form.visible) }} {% endif %} {% if form.visible is defined %} {{ form_row(form.visible) }} {% endif %}
</div> </div>
</div> </div>
@ -196,6 +220,29 @@
}); });
}); });
$(document.body).on("focusout","#registration_email",function(){
$.ajax({
method: "POST",
url: "{{ path('cadoles_core_ajax_iswhitelist') }}",
data: {
email:$("#registration_email").val(),
},
success: function(data) {
if(data=="KO") {
$("#registration_motivation").attr("required","required");
$(".alert-email").show();
$("label[for='registration_motivation']").text("Motivation *");
}
else {
$("#registration_motivation").removeAttr("required");
$(".alert-email").hide();
$("label[for='registration_motivation']").text("Motivation");
}
}
});
});
function hideshow() { function hideshow() {
if($("#registration_birthcountry").val()==269) if($("#registration_birthcountry").val()==269)
$("#blockcity").show(); $("#blockcity").show();
@ -207,10 +254,12 @@
niveau01=$("#registration_niveau01 option:selected").text().toLowerCase(); niveau01=$("#registration_niveau01 option:selected").text().toLowerCase();
if(niveau01.startsWith("autre")) { if(niveau01.startsWith("autre")) {
$("#niveau01other").show(); $("#niveau01other").show();
$("#registration_niveau01other").attr("required","required");
} }
else { else {
$("#registration_niveau01other").val(""); $("#registration_niveau01other").val("");
$("#niveau01other").hide(); $("#niveau01other").hide();
$("#registration_niveau01other").removeAttr("required");
} }
} }

View File

@ -63,6 +63,19 @@
<a class="btn btn-info" style="width:100%; margin-bottom:15px;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('cadoles_core_crop01') }}');" title='Ajouter un avatar'>Modifier</a> <a class="btn btn-info" style="width:100%; margin-bottom:15px;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('cadoles_core_crop01') }}');" title='Ajouter un avatar'>Modifier</a>
</div> </div>
{% if access=="config" %}
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-key fa-fw"></i> Notes Administrateur
</div>
<div class="panel-body">
{{ form_widget(form.note) }}
</div>
</div>
</div>
{%endif%}
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
@ -169,12 +182,21 @@
<tbody> <tbody>
{% for group in user.groups %} {% for group in user.groups %}
<tr id="linkgroup{{ group.group.id }}"> <tr id="linkgroup{{ group.group.id }}">
{% if access=="config" and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %} {% set canleave = true %}
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td> {% if group.group.fgtemplate or group.group.fgall or group.group.owner==user %}
{% elseif (group.group.fgopen or group.group.fgcanshare) and group.group.owner!=app.user and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %} {% set canleave = false %}
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td> {% elseif access!="config" %}
{% if not group.group.fgcanshare and not group.group.fgopen %}
{% set canleave = false %}
{% elseif group.group.fgcanshare and not app.session.get('permunsubscribe') and not group.group.fgopen %}
{% set canleave = false %}
{% endif %}
{% endif %}
{% if canleave %}
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out-alt fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
{% else %} {% else %}
<td></td> <td></td>
{% endif %} {% endif %}
<td> <td>

View File

@ -145,7 +145,7 @@ class CronCommand extends ContainerAwareCommand
if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1); if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1);
// Envoyer un mail à l'ensemble des administrateurs // Envoyer un mail à l'ensemble des administrateurs
$this->sendMailerror(); $this->sendMailerror($cron);
} }
} }
@ -161,7 +161,7 @@ class CronCommand extends ContainerAwareCommand
} }
} }
private function sendMailerror() { private function sendMailerror($cron) {
$appname=""; $appname="";
$config = $this->em->getRepository("CadolesCoreBundle:Config")->findOneBy(["id"=>"appname"]); $config = $this->em->getRepository("CadolesCoreBundle:Config")->findOneBy(["id"=>"appname"]);
if($config) $appname = $config->getValue(); if($config) $appname = $config->getValue();
@ -184,8 +184,8 @@ class CronCommand extends ContainerAwareCommand
$mail_params=array( $mail_params=array(
"subject" => $appname." : ERREUR SUR EXECUTION JOB", "subject" => $appname." : ERREUR SUR EXECUTION JOB",
"body_html"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.", "body_html"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.<br>Command = ".$cron->getCommand()."<br>Description = ".$cron->getDescription(),
"body_text"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS." "body_text"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.\nCommand = ".$cron->getCommand()."\nDescription = ".$cron->getDescription()
); );
$message = $this->container->get('cadoles.core.service.mail'); $message = $this->container->get('cadoles.core.service.mail');

View File

@ -73,11 +73,37 @@ class CalendareventController extends Controller
array_push($events,$tmp); array_push($events,$tmp);
array_push($eventids,$tmp["id"]); array_push($eventids,$tmp["id"]);
} }
// On recherche les taches associées aux groupes du calendrier
if($this->getUser()) {
$groups=$calendar->getGroups();
foreach($groups as $group) {
$projects=$group->getProjects();
foreach($projects as $project) {
$projecttasks = $this->getDoctrine()->getRepository("CadolesPortalBundle:Projecttask")->getProjectTasksByDate($project,$this->getUser(),$start,$end);
foreach($projecttasks as $projecttask) {
$tmp=[];
$tmp['id'] = "TASK".strval($projecttask->getId());
$tmp['title'] = "TACHE = ".$projecttask->getName();
$tmp['description'] = $projecttask->getDescription();
$tmp['start'] = $projecttask->getEnd()->format("Y-m-d\TH:i:s");
$tmp['end'] = $projecttask->getEnd()->format("Y-m-d\TH:i:s");
$tmp['color'] = "#".$this->get('session')->get('color')["main"];
$tmp['allDay'] = true;
$tmp['calendar'] = $project->getId();
$tmp['name'] = $project->getName()." - Tache";
$tmp['editable'] = false;
array_push($events,$tmp);
array_push($eventids,$tmp["id"]);
}
}
}
}
} }
// On récupére les évenement partagé de l'utilisateur // On récupére les évenement partagé de l'utilisateur
if($this->getUser()) { if($this->getUser()) {
$calendarevents = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->getCalendareventGroupsShareByDate($this->getUser(),$start,$end); $calendarevents = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->getCalendareventGroupsShareByDate($this->getUser(),$start,$end);
foreach($calendarevents as $calendarevent) { foreach($calendarevents as $calendarevent) {

View File

@ -100,12 +100,10 @@ class CalendareventRepository extends EntityRepository
// On récupère soit les calendriers du group en cours soit l'ensemble des calendriers de l'utilisateur // On récupère soit les calendriers du group en cours soit l'ensemble des calendriers de l'utilisateur
if($usage=="group") { if($usage=="group") {
$calendars=$em->getRepository("CadolesPortalBundle:Calendar")->getCalendarsGroup($user,$group); $calendars=$em->getRepository("CadolesPortalBundle:Calendar")->getCalendarsGroup($user,$group);
if($calendars) $firstcalendar=$calendars[0]->getId();
} }
else { else {
$em->getRepository("CadolesPortalBundle:Calendar")->getCalendarsUser($user,$calendarssuser,$calendarsadmin,$calendarsshared); $em->getRepository("CadolesPortalBundle:Calendar")->getCalendarsUser($user,$calendarssuser,$calendarsadmin,$calendarsshared);
$calendars=array_merge($calendarssuser,$calendarsadmin->toArray(),$calendarsshared); $calendars=array_merge($calendarssuser,$calendarsadmin->toArray(),$calendarsshared);
$firstcalendar="all";
} }
// Début & fin // Début & fin
@ -176,6 +174,41 @@ class CalendareventRepository extends EntityRepository
} }
} }
} }
// On récupère les taches associé à l'utilisateur
if($user) {
if($usage=="group") {
$projects=$em->getRepository("CadolesPortalBundle:Project")->getProjectsGroup($user,$group);
if($projects) $firstproject=$projects[0]->getId();
}
else {
$em->getRepository("CadolesPortalBundle:Project")->getProjectsUser($user,$projectssuser,$projectsadmin,$projectsshared);
$projects=array_merge($projectssuser,$projectsadmin->toArray(),$projectsshared);
$firstcalendar="all";
}
foreach($projects as $project) {
$projecttasks = $em->getRepository("CadolesPortalBundle:Projecttask")->getProjectTasksByDate($project,$user,$start,$end);
foreach($projecttasks as $projecttask) {
$tmp=[];
$tmp['id'] = "TASK".strval($projecttask->getId());
$tmp['title'] = $projecttask->getName();
$tmp['description'] = $projecttask->getDescription();
$tmp['start'] = $projecttask->getEnd();
$tmp['end'] = $projecttask->getEnd();
$tmp['color'] = "#".$sessioncolor;
$tmp['allDay'] = true;
$tmp['calendar'] = $project->getId();
$tmp['name'] = $project->getName()." - Tache";
$tmp['editable'] = false;
array_push($events,$tmp);
array_push($eventids,$tmp["id"]);
}
}
}
return $events; return $events;
} }
} }

View File

@ -25,4 +25,21 @@ class ProjecttaskRepository extends EntityRepository
->setFirstResult($start)->setMaxResults($length) ->setFirstResult($start)->setMaxResults($length)
->getQuery()->getResult(); ->getQuery()->getResult();
} }
public function getProjectTasksByDate($project,$user,$start,$end)
{
$projecttasks=$this->createQueryBuilder('projecttask')
->where('projecttask.project=:project')
->andWhere('projecttask.owner=:user OR projecttask.user=:user')
->andWhere('projecttask.end>=:start')
->andWhere('projecttask.end<=:end')
->setParameter('project',$project)
->setParameter('user',$user)
->setParameter('start',$start)
->setParameter('end',$end)
->OrderBy('projecttask.end', 'ASC')
->getQuery()->getResult();
return $projecttasks;
}
} }

View File

@ -144,6 +144,8 @@
&nbsp; &nbsp;
<input class="btn btn-primary" type='submit' value='Partager' onClick='shareEvent();' /> <input class="btn btn-primary" type='submit' value='Partager' onClick='shareEvent();' />
&nbsp; &nbsp;
<input class="btn btn-primary" type='submit' value='Cloner' onClick='showcloneEvent();' />
&nbsp;
<input class='btn btn-default' type='submit' value='Annuler' onClick='$("#mymodal-event-mod").modal("hide");'> <input class='btn btn-default' type='submit' value='Annuler' onClick='$("#mymodal-event-mod").modal("hide");'>
<input name="calendar_id" id="calendar_id" type="hidden" class="form-control" placeholder="Nom"> <input name="calendar_id" id="calendar_id" type="hidden" class="form-control" placeholder="Nom">
@ -217,11 +219,46 @@
</div> </div>
</div> </div>
</div> </div>
<!-- CLONE EVENEMENT -->
<div id="mymodal-event-clone" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Cloner Evénement</h4>
</div>
<div class="modal-body">
<input id='vladd' name='vladd' class='btn btn-success' type='submit' onClick='cloneEvent();' value='Valider' />
&nbsp;
<input class='btn btn-default' type='submit' value='Annuler' onClick='$("#mymodal-event-clone").modal("hide");'>
<input name="event_calendar" id="event_calendar" type="hidden" class="form-control" placeholder="Nom">
<input name="event_id" id="event_id" type="hidden" class="form-control" placeholder="Nom">
<input name="event_title" id="event_title" type="hidden" class="form-control" placeholder="Titre" value="">
<input name="event_description" id="event_description" type="hidden" class="form-control" placeholder="Titre" value="">
<input name="event_start_time" id="event_start_timem" type="hidden" class="form-control" placeholder="Date Début" value="">
<input name="event_end_time" id="event_end_timem" type="hidden" class="form-control" placeholder="Date Fin" value="">
<input name="event_start" id="event_startm" type="hidden" class="form-control" placeholder="Date Début" value="">
<input name="event_end" id="event_endm" type="hidden" class="form-control" placeholder="Date Fin" value="">
<input id="event_allday" name="event_allday" type="hidden" class="switch"">
<fieldset class="fieldset form-horizontal" style="clear:both; margin-top:30px;">
<div id="event_dates"></div>
</fieldset>
</div>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block localexternalscript %} {% block localexternalscript %}
<script type="text/javascript" src="/{{alias}}/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="/{{alias}}/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/{{alias}}/ckeditor/adapters/jquery.js"></script> <script type="text/javascript" src="/{{alias}}/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript" src="/{{alias}}/bundles/cadolescore/js/jquery-ui.multidatespicker.js"></script>
<link href="/{{alias}}/bundles/cadolescore/css/jquery-ui.multidatespicker.css" rel="stylesheet" media="screen" />
{% endblock %} {% endblock %}
{% block localjavascript %} {% block localjavascript %}
@ -357,17 +394,29 @@
// Modification Evenement // Modification Evenement
eventClick: function(event, jsEvent, view) { eventClick: function(event, jsEvent, view) {
if(event.editable) { if(event.editable) {
end=event.end.clone();
$("#mymodal-event-mod #event_id").val(event.id); $("#mymodal-event-mod #event_id").val(event.id);
$("#mymodal-event-mod #event_title").val(event.title); $("#mymodal-event-mod #event_title").val(event.title);
CKEDITOR.instances["event_description-mod"].setData(event.description) CKEDITOR.instances["event_description-mod"].setData(event.description)
$("#mymodal-event-mod #event_start_timem").val(event.start.format("DD/MM/YYYY HH:mm")); $("#mymodal-event-mod #event_start_timem").val(event.start.format("DD/MM/YYYY HH:mm"));
$("#mymodal-event-mod #event_end_timem").val(event.end.format("DD/MM/YYYY HH:mm")); $("#mymodal-event-mod #event_end_timem").val(event.end.format("DD/MM/YYYY HH:mm"));
$("#mymodal-event-mod #event_startm").val(event.start.format("DD/MM/YYYY")); $("#mymodal-event-mod #event_startm").val(event.start.format("DD/MM/YYYY"));
$("#mymodal-event-mod #event_endm").val(event.end.subtract("1","s").format("DD/MM/YYYY")); $("#mymodal-event-mod #event_endm").val(end.subtract("1","s").format("DD/MM/YYYY"));
$("#mymodal-event-mod #event_allday").bootstrapSwitch('state', event.allDay); $("#mymodal-event-mod #event_allday").bootstrapSwitch('state', event.allDay);
$("#mymodal-event-mod #event_calendar option[value='"+event.calendar+"']").prop('selected', true); $("#mymodal-event-mod #event_calendar option[value='"+event.calendar+"']").prop('selected', true);
$("#mymodal-event-clone #event_id").val(event.id);
$("#mymodal-event-clone #event_title").val(event.title);
$("#mymodal-event-clone #event_description").val(event.description);
$("#mymodal-event-clone #event_start_timem").val(event.start.format("HH:mm"));
$("#mymodal-event-clone #event_end_timem").val(event.end.format("HH:mm"));
$("#mymodal-event-clone #event_startm").val(event.start.format("DD/MM/YYYY"));
$("#mymodal-event-clone #event_endm").val(event.end.format("DD/MM/YYYY"));
$("#mymodal-event-clone #event_allday").val(event.allDay);
$("#mymodal-event-clone #event_calendar").val(event.calendar);
refreshPJ(); refreshPJ();
switchallDay("UPDATE"); switchallDay("UPDATE");
@ -526,7 +575,6 @@
}, },
false // make the event "stick" false // make the event "stick"
); );
console.log(event);
$("#mymodal-event-add").modal("hide"); $("#mymodal-event-add").modal("hide");
@ -625,6 +673,92 @@
$(location).attr('href',url); $(location).attr('href',url);
} }
function showcloneEvent() {
$("#mymodal-event-mod").modal("hide");
$("#mymodal-event-clone").modal("show");
$('#mymodal-event-clone #event_dates').multiDatesPicker({
firstDay: 1,
altField: "#datepicker",
closeText: 'Fermer',
prevText: 'Précédent',
nextText: 'Suivant',
currentText: 'Aujourd\'hui',
monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
monthNamesShort: ['Janv.', 'Févr.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Août', 'Sept.', 'Oct.', 'Nov.', 'Déc.'],
dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
dayNamesShort: ['Dim.', 'Lun.', 'Mar.', 'Mer.', 'Jeu.', 'Ven.', 'Sam.'],
dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
weekHeader: 'Sem.',
dateFormat: 'yy-mm-dd',
});
$('#mymodal-event-clone #event_dates').multiDatesPicker('resetDates')
}
function cloneEvent() {
var dates = $('#mymodal-event-clone #event_dates').multiDatesPicker('value');
dates=dates.replaceAll(' ','');
tbdates=dates.split(',');
var dstart=moment($("#mymodal-event-clone #event_startm").val(),"DD/MM/YYYY");
var tstart=$("#mymodal-event-clone #event_start_timem").val();
var dend=moment($("#mymodal-event-clone #event_endm").val(),"DD/MM/YYYY");
var tend=$("#mymodal-event-clone #event_end_timem").val();
var nbdays=dend.diff(dstart, 'days');
if($("#mymodal-event-clone #event_allday").val()=="true")
allDay=true;
else
allDay=false;
tbdates.forEach(function(date){
var mdatestart=moment(date +' '+tstart,"YYYY-MM-DD HH:mm");
var mdateend=moment(date +' '+tend,"YYYY-MM-DD HH:mm");
mdateend.add(nbdays,'days');
start=mdatestart.format("YYYY-MM-DD HH:mm");
end=mdateend.format("YYYY-MM-DD HH:mm");
$.ajax({
method: "POST",
url: "{{ path('cadoles_portal_'~access~'_calendarevent_submit') }}",
data: {
"title":$("#mymodal-event-clone #event_title").val(),
"description":$("#mymodal-event-clone #event_description").val(),
"start": start,
"end": end,
"allday": $("#mymodal-event-clone #event_allday").val(),
"idcalendar": $("#mymodal-event-clone #event_calendar").val()
},
success: function(data) {
start=mdatestart.format("YYYY-MM-DD HH:mm");
end=mdateend.format("YYYY-MM-DD HH:mm");
// Ajout de l'event dans fullcalendar
event = $('#calendar').fullCalendar('renderEvent',
{
id: data.id,
title: $("#mymodal-event-clone #event_title").val(),
description:$("#mymodal-event-clone #event_description").val(),
start: mdatestart,
end: mdateend,
editable: true,
color: data.color,
allDay: allDay,
calendar: $("#mymodal-event-clone #event_calendar").val(),
files: []
},
false // make the event "stick"
);
$("#mymodal-event-clone").modal("hide");
}
});
});
}
function deleteEvent() { function deleteEvent() {
$.ajax({ $.ajax({

View File

@ -82,6 +82,7 @@
{% endif %} {% endif %}
<div class="widget-event" style="background-color:{{ event.color }}; color: #FFF; padding:2px;" title="{{ event.description }}"> <div class="widget-event" style="background-color:{{ event.color }}; color: #FFF; padding:2px;" title="{{ event.description }}">
{{ event.name }} =
{% if not event.allDay %} {% if not event.allDay %}
{{ event.start | date("H:i") }} - {{ event.start | date("H:i") }} -
{%endif%} {%endif%}

View File

@ -192,9 +192,21 @@
<input type="text" id="mailsuject" name="mailsuject" required="required" class="form-control"> <input type="text" id="mailsuject" name="mailsuject" required="required" class="form-control">
</div> </div>
<div> <div>
<label class="control-label required">Destinataires (cliquez sur les images pour les enlever de la liste des destinataires)<span class="mandatory">*</span></label> <label class="control-label required">Destinataires<span class="mandatory">*</span></label>
<div id="listtoavatar"></div>
<input type="hidden" id="mailto" name="mailto" required="required" class="form-control"> <select id="destinataires" style="width:100%" name="states[]" multiple="multiple">
{% for user in group.users %}
{%if(user.user!=app.user)%}
<option value="{{user.user.email}}" data-image="\{{alias}}\uploads\avatar\{{user.user.avatar}}">{{user.user.lastname}} {{user.user.firstname}}</option>
{%endif%}
{% endfor %}
</select>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="checkalldestinataires">
<label class="form-check-label" for="checkalldestinataires">
Tout le monde
</label>
</div>
</div> </div>
<div class="form-group" style="margin-top:10px"> <div class="form-group" style="margin-top:10px">
<label class="control-label required">Corps du Mail<span class="mandatory">*</span></label> <label class="control-label required">Corps du Mail<span class="mandatory">*</span></label>
@ -482,24 +494,50 @@
sendbtn(); sendbtn();
}); });
function formatState (opt) {
if (!opt.id) {
return opt.text.toUpperCase();
}
var optimage = $(opt.element).attr('data-image');
console.log(optimage)
if(!optimage){
return opt.text.toUpperCase();
} else {
var $opt = $(
'<span><img src="' + optimage + '" width="30px" height="30px" style="border-radius:100%"/> ' + opt.text + '</span>'
);
return $opt;
}
};
$("#checkalldestinataires").click(function(){
if($("#checkalldestinataires").is(':checked') ){
$("#destinataires > option").prop("selected","selected");
$("#destinataires").trigger("change");
}else{
$("#destinataires > option").removeAttr("selected");
$("#destinataires").trigger("change");
}
});
function sendbtn() { function sendbtn() {
var data = CKEDITOR.instances["chat_message"].getData(); var data = CKEDITOR.instances["chat_message"].getData();
if($("#sendbymail").bootstrapSwitch('state')) { if($("#sendbymail").bootstrapSwitch('state')) {
CKEDITOR.instances["chat_messagemail"].setData(data); CKEDITOR.instances["chat_messagemail"].setData(data);
$("#mailsuject").val("{{app.session.get('appname')}} = Notification {{ group.label }}"); $("#mailsuject").val("{{app.session.get('appname')}} = Notification {{ group.label }}");
$("#mailto").val("");
$("#listtoavatar").html("");
{% for user in group.users %}
{%if(user.user!=app.user)%}
$("#mailto").val($("#mailto").val()+";{{user.user.email}}");
$("#listtoavatar").append($("<img class='avatar' title='{{user.user.lastname}} {{user.user.firstname}}' data-mail='{{user.user.email}}' src='\\{{alias}}\\uploads\\avatar\\{{user.user.avatar}}'>"));
{%endif%}
{% endfor %}
$("#sendbtnmail").show(); $("#sendbtnmail").show();
$("#sendbtnmailreply").hide(); $("#sendbtnmailreply").hide();
$('#mymodal-sendmail').modal('show'); $('#mymodal-sendmail').modal('show');
$("#checkalldestinataires").prop( "checked", false );
$("#destinataires > option").removeAttr("selected");
$("#destinataires").trigger("change");
$('#destinataires').select2({
templateResult: formatState,
templateSelection: formatState,
sorter: data => data.sort((a, b) => a.text.localeCompare(b.text)),
});
} }
else { else {
if(data) { if(data) {
@ -538,12 +576,15 @@
function sendbtnmail() { function sendbtnmail() {
var data = CKEDITOR.instances["chat_messagemail"].getData(); var data = CKEDITOR.instances["chat_messagemail"].getData();
var subject=$("#mailsuject").val(); var subject=$("#mailsuject").val();
var mailto=$("#mailto").val(); var destinataires=$("#destinataires").val();
if(data&&subject&&!(jQuery.isEmptyObject(destinataires))) {
if(data&&subject&&mailto) {
try { try {
// Flager que l'envoit c'est fait // Flager que l'envoit c'est fait
tosendmail=false; tosendmail=false;
mailto=destinataires.join(';');
mailto=";"+mailto;
$("#sendbtnmail").html("Envoyer"); $("#sendbtnmail").html("Envoyer");
$("#sendbtnmail").removeClass("btn-danger"); $("#sendbtnmail").removeClass("btn-danger");
$("#sendbtnmail").css('cursor','auto'); $("#sendbtnmail").css('cursor','auto');
@ -581,13 +622,15 @@
function sendbtnmailreply() { function sendbtnmailreply() {
var data = CKEDITOR.instances["chat_messagemail"].getData(); var data = CKEDITOR.instances["chat_messagemail"].getData();
var subject=$("#mailsuject").val(); var subject=$("#mailsuject").val();
var mailto=$("#mailto").val(); var destinataires=$("#destinataires").val();
if(data&&subject&&mailto) { if(data&&subject&&!(jQuery.isEmptyObject(destinataires))) {
try { try {
// Flager que l'envoit c'est fait // Flager que l'envoit c'est fait
tosendmail=false; tosendmail=false;
mailto=destinataires.join(';');
mailto=";"+mailto;
$("#sendbtnmailreply").html("Envoyer"); $("#sendbtnmailreply").html("Envoyer");
$("#sendbtnmailreply").removeClass("btn-danger"); $("#sendbtnmailreply").removeClass("btn-danger");
$("#sendbtnmailreply").css('cursor','auto'); $("#sendbtnmailreply").css('cursor','auto');
@ -681,21 +724,19 @@
$(document).on('click', '.btnreplymessagemail', function(){ $(document).on('click', '.btnreplymessagemail', function(){
CKEDITOR.instances["chat_messagemail"].setData(""); CKEDITOR.instances["chat_messagemail"].setData("");
$("#mailsuject").val("{{app.session.get('appname')}} = Notification {{ group.label }}"); $("#mailsuject").val("{{app.session.get('appname')}} = Notification {{ group.label }}");
$("#mailto").val("");
$("#listtoavatar").html("");
{% for user in group.users %}
{%if(user.user!=app.user)%}
$("#mailto").val($("#mailto").val()+";{{user.user.email}}");
$("#listtoavatar").append($("<img class='avatar' title='{{user.user.lastname}} {{user.user.firstname}}' data-mail='{{user.user.email}}' src='\\{{alias}}\\uploads\\avatar\\{{user.user.avatar}}'>"));
{%endif%}
{% endfor %}
$("#sendbtnmail").hide(); $("#sendbtnmail").hide();
$("#sendbtnmailreply").show(); $("#sendbtnmailreply").show();
$("#sendbtnmailreply").data("id",$(this).data("id")); $("#sendbtnmailreply").data("id",$(this).data("id"));
$('#mymodal-sendmail').modal('show'); $('#mymodal-sendmail').modal('show');
$("#checkalldestinataires").prop( "checked", false );
$("#destinataires > option").removeAttr("selected");
$("#destinataires").trigger("change");
$('#destinataires').select2({
templateResult: formatState,
templateSelection: formatState,
sorter: data => data.sort((a, b) => a.text.localeCompare(b.text)),
});
}); });
@ -734,12 +775,6 @@
} }
$(document).on('click', '#listtoavatar img', function(){
var mail = ";"+$(this).data("mail");
$("#mailto").val($("#mailto").val().replace(mail, ""));
$(this).remove();
});
function recuplastmsg() { function recuplastmsg() {
console.log("recuplastmsg"); console.log("recuplastmsg");
@ -827,7 +862,7 @@
if(!$("#online"+userid).length) { if(!$("#online"+userid).length) {
html = "<span id='online"+userid+"' style='width:70px; display:inline-block; text-align: center; font-size: 10px; color:#{{ colorbodyback }}; text-transform: uppercase; line-height:11px;overflow-wrap: break-word;vertical-align:top;'>"; html = "<span id='online"+userid+"' style='width:70px; display:inline-block; text-align: center; font-size: 10px; color:#{{ colorbodyback }}; text-transform: uppercase; line-height:11px;overflow-wrap: break-word;vertical-align:top;'>";
html+= "<img style='cursor:pointer; width:40px; height:40px; margin-bottom:5px;' onclick='seeUser("+userid+")' title='"+userlastname+" "+userfirstname+"' id='user_avatar_img' src='/{{ alias }}/uploads/avatar/"+useravatar+"' class='avatar'>"; html+= "<img style='cursor:pointer; width:40px; height:40px; margin-bottom:5px;' onclick='seeUser("+userid+")' title='"+userlastname+" "+userfirstname+"' id='user_avatar_img' src='/{{ alias }}/uploads/avatar/"+useravatar+"' class='avatar'>";
html+= "<span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>"; html+= "<br><span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>";
html+= "</span>"; html+= "</span>";
$("#useronline").append(html); $("#useronline").append(html);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -120,6 +120,7 @@ INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type
%end if %end if
('500', 1, 1, 1, 'permgroup', 'permgroup', 'ROLE_ANIM', '', 'Determine quel rôle aura la permission de créer des groupes de travail'), ('500', 1, 1, 1, 'permgroup', 'permgroup', 'ROLE_ANIM', '', 'Determine quel rôle aura la permission de créer des groupes de travail'),
('501', 1, 1, 1, 'permgroup', 'permannu', 'ROLE_USER', '', 'Determine quel rôle aura la permission de voir l\'annuaire'); ('501', 1, 1, 1, 'permgroup', 'permannu', 'ROLE_USER', '', 'Determine quel rôle aura la permission de voir l\'annuaire'),
('502', 1, 1, 1, 'boolean', 'permunsubscribe', '0', '', 'Permettre aux utilisateurs de se désinscrire par eux-mêmes des groupes de travail');

View File

@ -534,7 +534,7 @@ parameters:
# Si mode_auth = CAS # Si mode_auth = CAS
cas_host: %%eolesso_adresse cas_host: %%eolesso_adresse
cas_path: %%eolesso_cas_folder cas_path: %%getVar("eolesso_cas_folder", '')
cas_port: %%eolesso_port cas_port: %%eolesso_port
# Si mode_aut = SAML # Si mode_aut = SAML