Compare commits

..

No commits in common. "74c0a44f56151561703116e29403b7e8163aedbf" and "788e0f511ffa9ee9b7ab481c77db00c1073b29c8" have entirely different histories.

40 changed files with 111 additions and 1744 deletions

View File

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

View File

@ -139,16 +139,16 @@ class GroupController extends Controller
case 6 :
$qb->orderBy('table.owner',$order[0]["dir"]);
break;
case 8 :
case 7 :
$qb->orderBy('table.fgcancreatepage',$order[0]["dir"]);
break;
case 9 :
case 8 :
$qb->orderBy('table.fgcancreatecalendar',$order[0]["dir"]);
break;
case 10 :
case 9 :
$qb->orderBy('table.fgcancreateblog',$order[0]["dir"]);
break;
case 11 :
case 10 :
$qb->orderBy('table.fgcancreateproject',$order[0]["dir"]);
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->getFgcanshare())
$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>";
$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>";
}
else {
$fgproprio=($user==$data->getOwner());
@ -194,16 +194,11 @@ 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>";
}
else {
// 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>";
$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>";
}
if($data->getFgcanshare())
$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>";
$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>";
}
@ -222,12 +217,6 @@ class GroupController extends Controller
$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(
@ -238,7 +227,6 @@ class GroupController extends Controller
$filtre,
($data->getFgcanshare()?"oui":"non"),
$userinfo,
($visitelast?$visitelast->format("d/m/Y H:i")."<br>":"")."nb = ".$visitecpt,
($data->getFgcancreatepage()?"oui":"non"),
($data->getFgcancreatecalendar()?"oui":"non"),
($data->getFgcancreateblog()?"oui":"non"),
@ -573,7 +561,7 @@ class GroupController extends Controller
// Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) {
$idpage =$group->getPages()->first()->getId();
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
$url = $this->generateUrl('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";
@ -1022,61 +1010,6 @@ 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")
{
// Récupération de l'enregistrement courant
@ -1198,46 +1131,6 @@ 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) {
if($access!="config") {
$em = $this->getDoctrine()->getManager();

View File

@ -23,10 +23,6 @@ class MailController extends Controller
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
$form = $this->createForm(MailType::class);
@ -38,7 +34,7 @@ class MailController extends Controller
// Sujet
$url = $this->generateUrl('cadoles_core_registration',[], UrlGeneratorInterface::ABSOLUTE_URL)."?group=".$group->getId();
$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 = "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.= "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.= "Une fois le processus d'inscription complété, vous serez automatiquement rattaché à notre groupe de travail<br><br>";
@ -68,15 +64,8 @@ class MailController extends Controller
if($usergroup) array_push($usersin,$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();
$subject=$form->get("subject")->getData();
$template="template";
@ -89,17 +78,6 @@ class MailController extends Controller
$fromName = $this->getUser()->getFirstname()." ".$this->getUser()->getLastname();
$message = $this->container->get('cadoles.core.service.mail');
$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))) {

View File

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

View File

@ -429,15 +429,11 @@ class UserController extends Controller
// Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) {
$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";
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
$template="template";
$mail_params=array(
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
"body_html"=>$texthtml,
"body_html"=>nl2br($text),
"body_text"=>$text
);
$to = $data->getEmail();
@ -579,15 +575,11 @@ class UserController extends Controller
// Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) {
$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";
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
$template="template";
$mail_params=array(
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
"body_html"=>$texthtml,
"body_html"=>nl2br($text),
"body_text"=>$text
);
$to = $data->getEmail();
@ -918,7 +910,7 @@ class UserController extends Controller
public function exportuserAction(Request $request) {
$em = $this->getDoctrine()->getManager();
$dir = $this->get('kernel')->getRootDir() . '/../uploads/export/';
$file = "exportuser.csv";
$file = "export.csv";
$fs = new Filesystem();
$fs->mkdir($dir);
@ -928,7 +920,7 @@ class UserController extends Controller
$e = '"'; // this is the default but i like to be explicit
// 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","Date Visite","Cpt Visite","Groupes"];
$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"];
fputcsv($csvh, $data, $d, $e);
// Liste des utilisateurs en fonction du role de l'utilisateur en cours
@ -950,17 +942,6 @@ class UserController extends Controller
}
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 = [
"id"=>$user->getId(),
"username"=>$user->getUsername(),
@ -979,9 +960,6 @@ class UserController extends Controller
"birthdate"=>($user->getBirthdate()?$user->getBirthdate()->format("d/m/Y"):""),
"birthcountry"=>($user->getBirthcountry()?$user->getBirthcountry()->getLabel():""),
"birthplace"=>($user->getBirthplace()?$user->getBirthplace()->getLabel():""),
"visite"=>$visite,
"cptvisite"=>$cptvisite,
"groups"=>$groups,
];
@ -1483,7 +1461,7 @@ class UserController extends Controller
$niveau01=strtolower($data->getNiveau01()->getLabel());
if(stripos($niveau01,"autre")===0) {
if(!$data->getNiveau01other()) {
$form->addError(new FormError("Merci de compléter le champ 'Autre ".$this->getParameter("labelniveau01")."'"));
$form->addError(new FormError("Merci d'indiquer votre ".$this->getParameter("labelniveau01")));
}
}
}

View File

@ -207,25 +207,6 @@ 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()
{
$em = $this->getDoctrine()->getManager();

View File

@ -103,11 +103,6 @@ class Group
*/
private $idonlyoffice;
/**
* @ORM\Column(name="invitations", type="array", nullable=true)
*/
private $invitations;
/**
* @ORM\ManyToOne(targetEntity="Cadoles\PortalBundle\Entity\Icon", inversedBy="groups")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
@ -1090,28 +1085,4 @@ class Group
{
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,11 +143,6 @@ class Registration implements UserInterface, \Serializable
*/
private $motivation;
/**
* @ORM\Column(name="note", type="text", nullable=true)
*/
private $note;
/**
* @ORM\Column(type="integer", length=60, nullable=true)
*/
@ -845,28 +840,4 @@ class Registration implements UserInterface, \Serializable
{
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,12 +195,7 @@ class User implements UserInterface, \Serializable
* @ORM\Column(name="motivation", type="text", nullable=true)
*/
private $motivation;
/**
* @ORM\Column(name="note", type="text", nullable=true)
*/
private $note;
/**
* @ORM\Column(name="preference", type="array", nullable=true)
*/
@ -2064,28 +2059,4 @@ class User implements UserInterface, \Serializable
{
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,15 +45,6 @@ class RegistrationType extends AbstractType
"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
@ -96,7 +87,7 @@ class RegistrationType extends AbstractType
$builder->add('niveau01other',
TextType::class, array(
"label" =>"Autre ".$session->get('labelniveau01'). " *",
"label" =>"Autre ".$session->get('labelniveau01'),
"disabled" => ($options["mode"]=="delete"?true:false),
"required" => false,
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")

View File

@ -85,16 +85,7 @@ class UserType extends AbstractType
"required" => false,
"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"];

View File

@ -74,22 +74,6 @@ cadoles_core_config_file_subdirectory:
path: /config/file/subdirectory/{id}/{type}
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:
path: /config/file/delete/
defaults: { _controller: CadolesCoreBundle:File:delete, access: config }
@ -123,22 +107,6 @@ cadoles_core_user_file_subdirectory:
path: /user/file/subdirectory/{id}/{type}
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:
path: /user/file/delete
defaults: { _controller: CadolesCoreBundle:File:delete, access: user }
@ -160,7 +128,6 @@ cadoles_core_user_file_show:
defaults: { _controller: CadolesCoreBundle:File:show, access: user }
#== Ajax =================================================================================================================
cadoles_core_ajax_country_list:
path: /ajax/country/list
@ -194,10 +161,6 @@ cadoles_core_ajax_item_list:
path: /ajax/item/list
defaults: { _controller: CadolesCoreBundle:Ajax:itemlist }
cadoles_core_ajax_iswhitelist:
path: /ajax/iswhitelist
defaults: { _controller: CadolesCoreBundle:Whitelist:ajaxiswhitelist }
#== Home Config ==========================================================================================================
cadoles_core_config:
path: /config/home
@ -498,18 +461,10 @@ cadoles_core_config_group_ajax_switchmanager:
path: /config/group/ajax/switchmanager
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:
path: /config/group/users/export/{id}
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
cadoles_core_user_group:
path: /user/group
@ -567,10 +522,6 @@ cadoles_core_user_group_usergroup_export:
path: /user/group/users/export/{id}
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 ============================================================================================================
cadoles_core_config_whitelist:

View File

@ -1,12 +0,0 @@
/* 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,15 +381,6 @@ a.item-update {
z-index: 1000;
}
a.item-restaure {
display: none;
position: absolute;
right: 25px;
top: 2px;
z-index: 1000;
}
a.item-delete {
display: none;
position: absolute;

View File

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

View File

@ -49,24 +49,5 @@
$(window).load(function () {
$('#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 %}

View File

@ -33,10 +33,6 @@
text-transform: initial !important;
}
a.item-update {
right: 25px;
}
{% endblock %}
@ -45,7 +41,7 @@
<div id="explorer">
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups" style="margin-top:5px">
{% if canupdate and not fgtrash %}
{% if canupdate %}
<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">
<i class="fa fa-upload"></i>
@ -53,6 +49,7 @@
<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>
</button>
</div>
{% endif %}
@ -74,59 +71,23 @@
{% endif %}
</a>
{% set active="" %}
{% if sort=="name" %}
{% set active="active" %}
{%endif%}
{% if order=="SORT_ASC" %}
{%set action="SORT_DESC" %}
{%set action="date" %}
{% else %}
{%set action="SORT_ASC" %}
{%set action="name" %}
{% endif %}
{% if not subdirectory is empty %}
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':action }) }}" type="button" class="btn btn-primary">
{% else %}
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':action }) }}" type="button" class="btn btn-primary">
{% endif %}
{% if order=="SORT_ASC" %}
{% if sort=="name" %}
<i class="fas fa-long-arrow-alt-down"></i> Nom
{% 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
{% else %}
<i class="fas fa-long-arrow-alt-up"></i> Date
{% endif %}
</a>
</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>
@ -142,14 +103,12 @@
{% set datadir = datadir~'/'~sub %}
{% set sub = sub~"/"~parent %}
{% endif %}
{% 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>
<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>
{% endfor %}
{% if not subdirectory is empty %}
{% 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>
<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>
{% endif %}
</ol>
@ -165,23 +124,9 @@
<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">
{% 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">
<i class="fa fa-trash" title="Supprimer le dossier"></i>
</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 %}
<i class="fa fa-trash" title="Supprimer le dossier"></i>
</a>
{% endif %}
{% if subdirectory is empty %}
@ -208,23 +153,9 @@
<div class="grid-item grid-{{view}} file" data-dir="{{directory}}/{{subdirectory}}" data-name="{{file.name}}">
<div class="grid-item-content">
{% 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">
<i class="fa fa-trash" title="Supprimer le fichier"></i>
</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 %}
<i class="fa fa-trash" title="Supprimer le fichier"></i>
</a>
{% endif %}
{% if file.minefamily=="text" or file.minefamily=="image" or file.minetype == "application/pdf" %}
@ -274,12 +205,8 @@
else {
color = "#{{ color["main"]}}";
}
$(".item-update").css("color",color);
$(".item-update > i").css("color",color);
$(".item-delete").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);
$('#mymodal').on('shown.bs.modal', function() {
@ -366,47 +293,9 @@
}
}
// 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
function delFile(directory,subdirectory,filename) {
var r = confirm("Confirmez-vous la suppression définitive de ce fichier ?");
var r = confirm("Confirmez-vous la suppression de ce fichier ?");
if (r == true) {
$.ajax({
method: "POST",

View File

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

View File

@ -1,52 +0,0 @@
{% 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,21 +9,17 @@
{%endif%}
</h1>
<p>
{% 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") %}
<a class="btn btn-success" href={{ path('cadoles_core_'~access~'_group_submit') }}>
<p><a class="btn btn-success" href={{ path('cadoles_core_'~access~'_group_submit') }}>
{% if access=="config" %}
Ajouter
{% else %}
Créer un Groupe de Travail
{% endif %}
</a>
</a></p>
{% 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-heading">
@ -43,7 +39,6 @@
{% if portal_activate %}
<th>Groupe de Travail</th>
<th class="text-center">Propriétaire</th>
<th class="no-sort">Visite</th>
{% if access=="config" %}
<th>Création Pages</th>
<th>Création Calendriers</th>

View File

@ -11,7 +11,6 @@
{% 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="showInvitations();">Suivi des Invitations</a>
{%endif%}
<a class="btn btn-default pull-right" href={{ path('cadoles_core_'~access~'_group_usergroup_export',{'id':group.id}) }}>Exporter CSV</a>
<br><br>
@ -169,11 +168,4 @@
$("#mymodal").find("#framemodal").attr("src",url);
$("#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 %}

View File

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

View File

@ -21,11 +21,7 @@
{% endif %}
{% if mode!="submit" %}
{% 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%}
{% if mode=="send" %} {{ form_widget(form.save) }} {%endif%}
<a class="btn btn-default" href={{ path('cadoles_core_config_registration') }}>Annuler</a>
{% endif %}
@ -60,19 +56,6 @@
{% endif %}
<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="panel panel-primary">
<div class="panel-heading">
@ -107,14 +90,7 @@
<div class="panel-body">
{% if form.firstname is defined %} {{ form_row(form.firstname) }} {% endif %}
{{ form_row(form.lastname) }}
{% 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.email is defined %} {{ form_row(form.email) }} {% endif %}
{% if form.visible is defined %} {{ form_row(form.visible) }} {% endif %}
</div>
</div>
@ -220,29 +196,6 @@
});
});
$(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() {
if($("#registration_birthcountry").val()==269)
$("#blockcity").show();
@ -254,12 +207,10 @@
niveau01=$("#registration_niveau01 option:selected").text().toLowerCase();
if(niveau01.startsWith("autre")) {
$("#niveau01other").show();
$("#registration_niveau01other").attr("required","required");
}
else {
$("#registration_niveau01other").val("");
$("#niveau01other").hide();
$("#registration_niveau01other").removeAttr("required");
}
}

View File

@ -63,19 +63,6 @@
<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>
{% 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="panel panel-primary">
<div class="panel-heading">
@ -182,21 +169,12 @@
<tbody>
{% for group in user.groups %}
<tr id="linkgroup{{ group.group.id }}">
{% set canleave = true %}
{% if group.group.fgtemplate or group.group.fgall or group.group.owner==user %}
{% set canleave = false %}
{% 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>
{% if access=="config" and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %}
<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 (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 =="" %}
<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>
{% else %}
<td></td>
<td></td>
{% endif %}
<td>

View File

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

View File

@ -73,37 +73,11 @@ class CalendareventController extends Controller
array_push($events,$tmp);
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
if($this->getUser()) {
$calendarevents = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->getCalendareventGroupsShareByDate($this->getUser(),$start,$end);
foreach($calendarevents as $calendarevent) {

View File

@ -100,10 +100,12 @@ class CalendareventRepository extends EntityRepository
// On récupère soit les calendriers du group en cours soit l'ensemble des calendriers de l'utilisateur
if($usage=="group") {
$calendars=$em->getRepository("CadolesPortalBundle:Calendar")->getCalendarsGroup($user,$group);
if($calendars) $firstcalendar=$calendars[0]->getId();
}
else {
$em->getRepository("CadolesPortalBundle:Calendar")->getCalendarsUser($user,$calendarssuser,$calendarsadmin,$calendarsshared);
$calendars=array_merge($calendarssuser,$calendarsadmin->toArray(),$calendarsshared);
$firstcalendar="all";
}
// Début & fin
@ -174,41 +176,6 @@ 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;
}
}

View File

@ -25,21 +25,4 @@ class ProjecttaskRepository extends EntityRepository
->setFirstResult($start)->setMaxResults($length)
->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,8 +144,6 @@
&nbsp;
<input class="btn btn-primary" type='submit' value='Partager' onClick='shareEvent();' />
&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 name="calendar_id" id="calendar_id" type="hidden" class="form-control" placeholder="Nom">
@ -219,46 +217,11 @@
</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 %}
{% block localexternalscript %}
<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}}/bundles/cadolescore/js/jquery-ui.multidatespicker.js"></script>
<link href="/{{alias}}/bundles/cadolescore/css/jquery-ui.multidatespicker.css" rel="stylesheet" media="screen" />
{% endblock %}
{% block localjavascript %}
@ -394,29 +357,17 @@
// Modification Evenement
eventClick: function(event, jsEvent, view) {
if(event.editable) {
end=event.end.clone();
$("#mymodal-event-mod #event_id").val(event.id);
$("#mymodal-event-mod #event_title").val(event.title);
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_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_endm").val(end.subtract("1","s").format("DD/MM/YYYY"));
$("#mymodal-event-mod #event_endm").val(event.end.subtract("1","s").format("DD/MM/YYYY"));
$("#mymodal-event-mod #event_allday").bootstrapSwitch('state', event.allDay);
$("#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();
switchallDay("UPDATE");
@ -575,6 +526,7 @@
},
false // make the event "stick"
);
console.log(event);
$("#mymodal-event-add").modal("hide");
@ -673,92 +625,6 @@
$(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() {
$.ajax({

View File

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

View File

@ -192,21 +192,9 @@
<input type="text" id="mailsuject" name="mailsuject" required="required" class="form-control">
</div>
<div>
<label class="control-label required">Destinataires<span class="mandatory">*</span></label>
<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>
<label class="control-label required">Destinataires (cliquez sur les images pour les enlever de la liste des destinataires)<span class="mandatory">*</span></label>
<div id="listtoavatar"></div>
<input type="hidden" id="mailto" name="mailto" required="required" class="form-control">
</div>
<div class="form-group" style="margin-top:10px">
<label class="control-label required">Corps du Mail<span class="mandatory">*</span></label>
@ -494,50 +482,24 @@
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() {
var data = CKEDITOR.instances["chat_message"].getData();
if($("#sendbymail").bootstrapSwitch('state')) {
CKEDITOR.instances["chat_messagemail"].setData(data);
$("#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();
$("#sendbtnmailreply").hide();
$('#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 {
if(data) {
@ -576,15 +538,12 @@
function sendbtnmail() {
var data = CKEDITOR.instances["chat_messagemail"].getData();
var subject=$("#mailsuject").val();
var destinataires=$("#destinataires").val();
if(data&&subject&&!(jQuery.isEmptyObject(destinataires))) {
var mailto=$("#mailto").val();
if(data&&subject&&mailto) {
try {
// Flager que l'envoit c'est fait
tosendmail=false;
mailto=destinataires.join(';');
mailto=";"+mailto;
$("#sendbtnmail").html("Envoyer");
$("#sendbtnmail").removeClass("btn-danger");
$("#sendbtnmail").css('cursor','auto');
@ -622,15 +581,13 @@
function sendbtnmailreply() {
var data = CKEDITOR.instances["chat_messagemail"].getData();
var subject=$("#mailsuject").val();
var destinataires=$("#destinataires").val();
var mailto=$("#mailto").val();
if(data&&subject&&!(jQuery.isEmptyObject(destinataires))) {
if(data&&subject&&mailto) {
try {
// Flager que l'envoit c'est fait
tosendmail=false;
mailto=destinataires.join(';');
mailto=";"+mailto;
$("#sendbtnmailreply").html("Envoyer");
$("#sendbtnmailreply").removeClass("btn-danger");
$("#sendbtnmailreply").css('cursor','auto');
@ -724,19 +681,21 @@
$(document).on('click', '.btnreplymessagemail', function(){
CKEDITOR.instances["chat_messagemail"].setData("");
$("#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();
$("#sendbtnmailreply").show();
$("#sendbtnmailreply").data("id",$(this).data("id"));
$('#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)),
});
});
@ -775,6 +734,12 @@
}
$(document).on('click', '#listtoavatar img', function(){
var mail = ";"+$(this).data("mail");
$("#mailto").val($("#mailto").val().replace(mail, ""));
$(this).remove();
});
function recuplastmsg() {
console.log("recuplastmsg");
@ -862,7 +827,7 @@
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+= "<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+= "<br><span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>";
html+= "<span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>";
html+= "</span>";
$("#useronline").append(html);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

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

View File

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