Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
50ae3ed4c4
|
@ -194,8 +194,9 @@ class PurgeFileCommand extends Command
|
||||||
foreach (iterator_to_array($finder) as $file) {
|
foreach (iterator_to_array($finder) as $file) {
|
||||||
$name = $file->getRelativePathname();
|
$name = $file->getRelativePathname();
|
||||||
if($name!="logo.png") {
|
if($name!="logo.png") {
|
||||||
$entity=$this->em->getRepository("CadolesCoreBundle:Niveau01")->findBy(["logo"=>"uploads/niveau01/".$name]);
|
$logo=$this->em->getRepository("CadolesCoreBundle:Niveau01")->findBy(["logo"=>"uploads/niveau01/".$name]);
|
||||||
if(!$entity) {
|
$header=$this->em->getRepository("CadolesCoreBundle:Niveau01")->findBy(["header"=>"uploads/niveau01/".$name]);
|
||||||
|
if(!$logo&&!$header) {
|
||||||
$this->writeln($name);
|
$this->writeln($name);
|
||||||
$url=$directory."/".$name;
|
$url=$directory."/".$name;
|
||||||
if($fs->exists($url)) {
|
if($fs->exists($url)) {
|
||||||
|
|
|
@ -1189,6 +1189,11 @@ class GroupController extends Controller
|
||||||
$em->persist($pages[0]);
|
$em->persist($pages[0]);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
|
foreach($pages as $page) {
|
||||||
|
$page->setUser($group->getOwner());
|
||||||
|
$em->persist($page);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
// On regarde s'il a au moins un calendrier
|
// On regarde s'il a au moins un calendrier
|
||||||
if($group->getCalendars()->isEmpty()) {
|
if($group->getCalendars()->isEmpty()) {
|
||||||
|
@ -1212,6 +1217,11 @@ class GroupController extends Controller
|
||||||
$em->persist($calendars[0]);
|
$em->persist($calendars[0]);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
|
foreach($calendars as $calendar) {
|
||||||
|
$calendar->setUser($group->getOwner());
|
||||||
|
$em->persist($calendar);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On regarde s'il a au moins un blog
|
// On regarde s'il a au moins un blog
|
||||||
|
@ -1232,6 +1242,11 @@ class GroupController extends Controller
|
||||||
$em->persist($blogs[0]);
|
$em->persist($blogs[0]);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
|
foreach($blogs as $blog) {
|
||||||
|
$blog->setUser($group->getOwner());
|
||||||
|
$em->persist($blog);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On regarde s'il a au moins un project
|
// On regarde s'il a au moins un project
|
||||||
|
@ -1252,6 +1267,11 @@ class GroupController extends Controller
|
||||||
$em->persist($projects[0]);
|
$em->persist($projects[0]);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
|
foreach($projects as $project) {
|
||||||
|
$project->setUser($group->getOwner());
|
||||||
|
$em->persist($project);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,20 +43,35 @@ class Niveau01Controller extends Controller
|
||||||
$draw= $request->query->get('draw');
|
$draw= $request->query->get('draw');
|
||||||
$order= $request->query->get('order');
|
$order= $request->query->get('order');
|
||||||
|
|
||||||
|
// Modo ?
|
||||||
|
$ismodo=false;
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO") {
|
||||||
|
$ismodo=true;
|
||||||
|
}
|
||||||
|
|
||||||
// Nombre total d'enregistrement
|
// Nombre total d'enregistrement
|
||||||
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
|
if($ismodo)
|
||||||
|
$total = $em->createQueryBuilder()->select('COUNT(table)')->from("CadolesCoreBundle:UserModo",'table')->where("table.user = :user")->setParameter("user", $this->getUser())->getQuery()->getSingleScalarResult();
|
||||||
|
else
|
||||||
|
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
|
||||||
|
|
||||||
// Nombre d'enregistrement filtré
|
// Nombre d'enregistrement filtré
|
||||||
if($search["value"]=="")
|
if($search["value"]=="")
|
||||||
$totalf = $total;
|
$totalf = $total;
|
||||||
else {
|
else {
|
||||||
$totalf= $em->createQueryBuilder()
|
$qb = $em->createQueryBuilder()
|
||||||
->select('COUNT(table)')
|
->select('COUNT(table)')
|
||||||
->from($this->labelentity,'table')
|
->from($this->labelentity,'table')
|
||||||
->where('table.label LIKE :value')
|
->where('table.label LIKE :value')
|
||||||
->setParameter("value", "%".$search["value"]."%")
|
->setParameter("value", "%".$search["value"]."%");
|
||||||
->getQuery()
|
if($ismodo)
|
||||||
->getSingleScalarResult();
|
$qb ->from("CadolesCoreBundle:UserModo","usermodo")
|
||||||
|
->andwhere("usermodo.user = :user")
|
||||||
|
->andWhere("usermodo.niveau01=table")
|
||||||
|
->setParameter("user", $this->getUser());
|
||||||
|
|
||||||
|
|
||||||
|
$totalf = $qb->getQuery()->getSingleScalarResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construction du tableau de retour
|
// Construction du tableau de retour
|
||||||
|
@ -70,8 +85,15 @@ class Niveau01Controller extends Controller
|
||||||
// Parcours des Enregistrement
|
// Parcours des Enregistrement
|
||||||
$qb = $em->createQueryBuilder();
|
$qb = $em->createQueryBuilder();
|
||||||
$qb->select('table')->from($this->labelentity,'table');
|
$qb->select('table')->from($this->labelentity,'table');
|
||||||
|
if($ismodo) {
|
||||||
|
$qb->from("CadolesCoreBundle:UserModo","usermodo")
|
||||||
|
->where("usermodo.user = :user")
|
||||||
|
->andWhere("usermodo.niveau01=table")
|
||||||
|
->setParameter("user", $this->getUser());
|
||||||
|
}
|
||||||
|
|
||||||
if($search["value"]!="") {
|
if($search["value"]!="") {
|
||||||
$qb ->where('table.label LIKE :value')
|
$qb ->andwhere('table.label LIKE :value')
|
||||||
->setParameter("value", "%".$search["value"]."%");
|
->setParameter("value", "%".$search["value"]."%");
|
||||||
}
|
}
|
||||||
switch($order[0]["column"]) {
|
switch($order[0]["column"]) {
|
||||||
|
@ -84,7 +106,7 @@ class Niveau01Controller extends Controller
|
||||||
|
|
||||||
foreach($datas as $data) {
|
foreach($datas as $data) {
|
||||||
$action ="<a href='".$this->generateUrl('cadoles_core_config_niveau01_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
|
$action ="<a href='".$this->generateUrl('cadoles_core_config_niveau01_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
|
||||||
if($data->getId()>0) $action.="<a href='".$this->generateUrl('cadoles_core_config_niveau01_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
|
if($data->getId()>0&&!$ismodo) $action.="<a href='".$this->generateUrl('cadoles_core_config_niveau01_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
|
||||||
array_push($output["data"],array($action,$data->getLabel()));
|
array_push($output["data"],array($action,$data->getLabel()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +119,10 @@ class Niveau01Controller extends Controller
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$data = new Niveau01();
|
$data = new Niveau01();
|
||||||
|
|
||||||
|
// Interdit pour les modos
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO")
|
||||||
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Niveau01Type::class,$data,array(
|
$form = $this->createForm(Niveau01Type::class,$data,array(
|
||||||
"mode" => "submit",
|
"mode" => "submit",
|
||||||
|
@ -136,10 +162,16 @@ class Niveau01Controller extends Controller
|
||||||
|
|
||||||
public function updateAction($id,Request $request)
|
public function updateAction($id,Request $request)
|
||||||
{
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
// Récupération de l'enregistrement courant
|
// Récupération de l'enregistrement courant
|
||||||
$data=$this->getData($id);
|
$data=$this->getData($id);
|
||||||
|
|
||||||
// Vérifier que cet enregistrement est modifiable
|
// Modification modo que si niveau modéré
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO") {
|
||||||
|
$usermodo=$em->getRepository("CadolesCoreBundle:UserModo")->findOneBy(["user"=>$this->getUser(),"niveau01"=>$data]);
|
||||||
|
if(!$usermodo) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Niveau01Type::class,$data,array(
|
$form = $this->createForm(Niveau01Type::class,$data,array(
|
||||||
|
@ -156,7 +188,6 @@ class Niveau01Controller extends Controller
|
||||||
|
|
||||||
// Sur validation
|
// Sur validation
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
|
|
||||||
// Sauvegarde
|
// Sauvegarde
|
||||||
|
@ -184,7 +215,9 @@ class Niveau01Controller extends Controller
|
||||||
// Récupération de l'enregistrement courant
|
// Récupération de l'enregistrement courant
|
||||||
$data=$this->getData($id);
|
$data=$this->getData($id);
|
||||||
|
|
||||||
// Vérifier que cet enregistrement est supprimable
|
// Interdit pour les modos
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO")
|
||||||
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Niveau01Type::class,$data,array(
|
$form = $this->createForm(Niveau01Type::class,$data,array(
|
||||||
|
@ -228,6 +261,15 @@ class Niveau01Controller extends Controller
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function headerAction()
|
||||||
|
{
|
||||||
|
return $this->render('CadolesCoreBundle:Niveau01:header.html.twig',[
|
||||||
|
'useheader' => false,
|
||||||
|
'usemenu' => false,
|
||||||
|
'usesidebar' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getDatas()
|
protected function getDatas()
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
|
@ -43,22 +43,45 @@ class Niveau02Controller extends Controller
|
||||||
$draw= $request->query->get('draw');
|
$draw= $request->query->get('draw');
|
||||||
$order= $request->query->get('order');
|
$order= $request->query->get('order');
|
||||||
|
|
||||||
|
// Modo ?
|
||||||
|
$ismodo=false;
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO") {
|
||||||
|
$ismodo=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Nombre total d'enregistrement
|
// Nombre total d'enregistrement
|
||||||
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
|
if($ismodo) {
|
||||||
|
$total = $em->createQueryBuilder()->select('COUNT(table)')
|
||||||
|
->from($this->labelentity,'table')
|
||||||
|
->from("CadolesCoreBundle:UserModo","usermodo")
|
||||||
|
->Where("table.niveau01=usermodo.niveau01")
|
||||||
|
->andWhere("usermodo.user=:user")
|
||||||
|
->setParameter("user",$this->getUser())
|
||||||
|
->getQuery()->getSingleScalarResult();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
|
||||||
|
|
||||||
// Nombre d'enregistrement filtré
|
// Nombre d'enregistrement filtré
|
||||||
if($search["value"]=="")
|
if($search["value"]=="")
|
||||||
$totalf = $total;
|
$totalf = $total;
|
||||||
else {
|
else {
|
||||||
$totalf= $em->createQueryBuilder()
|
$qb = $em ->createQueryBuilder()
|
||||||
->select('COUNT(table)')
|
->select('COUNT(table)')
|
||||||
->from($this->labelentity,'table')
|
->from($this->labelentity,'table')
|
||||||
->from("CadolesCoreBundle:Niveau01",'nv1')
|
->from("CadolesCoreBundle:Niveau01",'nv1')
|
||||||
->where('table.niveau01=nv1.id')
|
->where('table.niveau01=nv1.id')
|
||||||
->andwhere('table.label LIKE :value or nv1.label LIKE :value')
|
->andwhere('table.label LIKE :value or nv1.label LIKE :value')
|
||||||
->setParameter("value", "%".$search["value"]."%")
|
->setParameter("value", "%".$search["value"]."%");
|
||||||
->getQuery()
|
if($ismodo) {
|
||||||
->getSingleScalarResult();
|
$qb ->from("CadolesCoreBundle:UserModo","usermodo")
|
||||||
|
->andwhere("table.niveau01=usermodo.niveau01")
|
||||||
|
->andWhere("usermodo.user=:user")
|
||||||
|
->setParameter("user",$this->getUser());
|
||||||
|
}
|
||||||
|
|
||||||
|
$totalf = $qb->getQuery()->getSingleScalarResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construction du tableau de retour
|
// Construction du tableau de retour
|
||||||
|
@ -79,6 +102,13 @@ class Niveau02Controller extends Controller
|
||||||
$qb ->andwhere('table.label LIKE :value or nv1.label LIKE :value')
|
$qb ->andwhere('table.label LIKE :value or nv1.label LIKE :value')
|
||||||
->setParameter("value", "%".$search["value"]."%");
|
->setParameter("value", "%".$search["value"]."%");
|
||||||
}
|
}
|
||||||
|
if($ismodo) {
|
||||||
|
$qb->from("CadolesCoreBundle:UserModo","usermodo")
|
||||||
|
->andWhere("table.niveau01=usermodo.niveau01")
|
||||||
|
->andWhere("usermodo.user=:user")
|
||||||
|
->setParameter("user",$this->getUser());
|
||||||
|
}
|
||||||
|
|
||||||
switch($order[0]["column"]) {
|
switch($order[0]["column"]) {
|
||||||
case 1 :
|
case 1 :
|
||||||
$qb->orderBy('nv1.label',$order[0]["dir"]);
|
$qb->orderBy('nv1.label',$order[0]["dir"]);
|
||||||
|
@ -107,7 +137,7 @@ class Niveau02Controller extends Controller
|
||||||
$data = new Niveau02();
|
$data = new Niveau02();
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"submit"));
|
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"submit","user"=>$this->getUser()));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
@ -141,13 +171,19 @@ class Niveau02Controller extends Controller
|
||||||
|
|
||||||
public function updateAction($id,Request $request)
|
public function updateAction($id,Request $request)
|
||||||
{
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
// Récupération de l'enregistrement courant
|
// Récupération de l'enregistrement courant
|
||||||
$data=$this->getData($id);
|
$data=$this->getData($id);
|
||||||
|
|
||||||
// Vérifier que cet enregistrement est modifiable
|
// Suppression modo que si niveau modéré
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO") {
|
||||||
|
$usermodo=$em->getRepository("CadolesCoreBundle:UserModo")->findOneBy(["user"=>$this->getUser(),"niveau01"=>$data->getNiveau01()]);
|
||||||
|
if(!$usermodo) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"update"));
|
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"update","user"=>$this->getUser()));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
@ -157,7 +193,6 @@ class Niveau02Controller extends Controller
|
||||||
|
|
||||||
// Sur validation
|
// Sur validation
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
|
|
||||||
// Sauvegarde
|
// Sauvegarde
|
||||||
|
@ -182,13 +217,19 @@ class Niveau02Controller extends Controller
|
||||||
|
|
||||||
public function deleteAction($id,Request $request)
|
public function deleteAction($id,Request $request)
|
||||||
{
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
// Récupération de l'enregistrement courant
|
// Récupération de l'enregistrement courant
|
||||||
$data=$this->getData($id);
|
$data=$this->getData($id);
|
||||||
|
|
||||||
// Vérifier que cet enregistrement est supprimable
|
// Suppression modo que si niveau modéré
|
||||||
|
if($this->getUser()->getRole()=="ROLE_MODO") {
|
||||||
|
$usermodo=$em->getRepository("CadolesCoreBundle:UserModo")->findOneBy(["user"=>$this->getUser(),"niveau01"=>$data->getNiveau01()]);
|
||||||
|
if(!$usermodo) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"delete"));
|
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"delete","user"=>$this->getUser()));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
@ -198,7 +239,6 @@ class Niveau02Controller extends Controller
|
||||||
|
|
||||||
// Sur validation
|
// Sur validation
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$em->remove($data);
|
$em->remove($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
|
@ -702,7 +702,17 @@ class UserController extends Controller
|
||||||
|
|
||||||
// Vérifier que cet enregistrement est supprimable
|
// Vérifier que cet enregistrement est supprimable
|
||||||
if($this->GetParameter("masteridentity")=="LDAP")
|
if($this->GetParameter("masteridentity")=="LDAP")
|
||||||
throw $this->createNotFoundException('Permission denied');
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
// Alerte si utilisateur propriétaire de groupe
|
||||||
|
if(!$data->getOwnergroups()->isEmpty()) {
|
||||||
|
$message ="ATTENTION CET UTILSATEUR EST PROPRIETAIRE DES GROUPES DE TRAVAIL SUIVANT<br>";
|
||||||
|
foreach($data->getOwnergroups() as $group) {
|
||||||
|
$message.=" - <a href='".$this->generateUrl('cadoles_core_config_group_update', array('id'=>$group->getId()))."' target='_blank'>".$group->getLabel()."</a><br>";
|
||||||
|
}
|
||||||
|
$message.="<br>En le supprimant les groupes en question n'auront plus de propriétaire";
|
||||||
|
$request->getSession()->getFlashBag()->add("notice", $message);
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(UserType::class,$data,array(
|
$form = $this->createForm(UserType::class,$data,array(
|
||||||
|
@ -722,6 +732,37 @@ class UserController extends Controller
|
||||||
|
|
||||||
// Sur validation
|
// Sur validation
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
|
// Avant de supprimer l'utilisateur on passe à vide l'ensemble des groupes propriétaire à vide
|
||||||
|
foreach($data->getOwnergroups() as $group) {
|
||||||
|
$pages=$group->getPages();
|
||||||
|
foreach($pages as $page) {
|
||||||
|
$page->setUser(null);
|
||||||
|
$em->persist($page);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$blogs=$group->getBlogs();
|
||||||
|
foreach($blogs as $blog) {
|
||||||
|
$blog->setUser(null);
|
||||||
|
$em->persist($blog);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$calendars=$group->getCalendars();
|
||||||
|
foreach($calendars as $calendar) {
|
||||||
|
$calendar->setUser(null);
|
||||||
|
$em->persist($calendar);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$projects=$group->getProjects();
|
||||||
|
foreach($projects as $project) {
|
||||||
|
$project->setUser(null);
|
||||||
|
$em->persist($project);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$em->remove($data);
|
$em->remove($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,36 @@ class Niveau01
|
||||||
*/
|
*/
|
||||||
private $logo;
|
private $logo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $header;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $colormain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $fontcolorhover;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $colorbody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $fontfacetitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $fontfacebody;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="text", nullable=true)
|
* @ORM\Column(type="text", nullable=true)
|
||||||
*/
|
*/
|
||||||
|
@ -465,4 +495,148 @@ class Niveau01
|
||||||
{
|
{
|
||||||
return $this->alerts;
|
return $this->alerts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set header
|
||||||
|
*
|
||||||
|
* @param string $header
|
||||||
|
*
|
||||||
|
* @return Niveau01
|
||||||
|
*/
|
||||||
|
public function setHeader($header)
|
||||||
|
{
|
||||||
|
$this->header = $header;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get header
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHeader()
|
||||||
|
{
|
||||||
|
return $this->header;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set colormain
|
||||||
|
*
|
||||||
|
* @param string $colormain
|
||||||
|
*
|
||||||
|
* @return Niveau01
|
||||||
|
*/
|
||||||
|
public function setColormain($colormain)
|
||||||
|
{
|
||||||
|
$this->colormain = $colormain;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get colormain
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getColormain()
|
||||||
|
{
|
||||||
|
return $this->colormain;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set fontcolorhover
|
||||||
|
*
|
||||||
|
* @param string $fontcolorhover
|
||||||
|
*
|
||||||
|
* @return Niveau01
|
||||||
|
*/
|
||||||
|
public function setFontcolorhover($fontcolorhover)
|
||||||
|
{
|
||||||
|
$this->fontcolorhover = $fontcolorhover;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fontcolorhover
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFontcolorhover()
|
||||||
|
{
|
||||||
|
return $this->fontcolorhover;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set colorbody
|
||||||
|
*
|
||||||
|
* @param string $colorbody
|
||||||
|
*
|
||||||
|
* @return Niveau01
|
||||||
|
*/
|
||||||
|
public function setColorbody($colorbody)
|
||||||
|
{
|
||||||
|
$this->colorbody = $colorbody;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get colorbody
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getColorbody()
|
||||||
|
{
|
||||||
|
return $this->colorbody;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set fontfacetitle
|
||||||
|
*
|
||||||
|
* @param string $fontfacetitle
|
||||||
|
*
|
||||||
|
* @return Niveau01
|
||||||
|
*/
|
||||||
|
public function setFontfacetitle($fontfacetitle)
|
||||||
|
{
|
||||||
|
$this->fontfacetitle = $fontfacetitle;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fontfacetitle
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFontfacetitle()
|
||||||
|
{
|
||||||
|
return $this->fontfacetitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set fontfacebody
|
||||||
|
*
|
||||||
|
* @param string $fontfacebody
|
||||||
|
*
|
||||||
|
* @return Niveau01
|
||||||
|
*/
|
||||||
|
public function setFontfacebody($fontfacebody)
|
||||||
|
{
|
||||||
|
$this->fontfacebody = $fontfacebody;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fontfacebody
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFontfacebody()
|
||||||
|
{
|
||||||
|
return $this->fontfacebody;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,11 +54,6 @@
|
||||||
$session->set($config->getId(), strval($config->getValue()));
|
$session->set($config->getId(), strval($config->getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Calcul des couleurs
|
|
||||||
$color = $this->container->get('cadoles.core.service.color');
|
|
||||||
$color->setColor();
|
|
||||||
|
|
||||||
// Utilisateur en cours
|
// Utilisateur en cours
|
||||||
$curentuserid=0;
|
$curentuserid=0;
|
||||||
$token = $this->token_storage->getToken();
|
$token = $this->token_storage->getToken();
|
||||||
|
@ -283,10 +278,33 @@
|
||||||
if(!is_null($niveau01->getLogo()))
|
if(!is_null($niveau01->getLogo()))
|
||||||
$session->set("sublogo", $niveau01->getLogo());
|
$session->set("sublogo", $niveau01->getLogo());
|
||||||
|
|
||||||
}
|
if(!is_null($niveau01->getHeader()))
|
||||||
|
$session->set("header", $niveau01->getHeader());
|
||||||
|
|
||||||
|
if(!is_null($niveau01->getColormain()))
|
||||||
|
$session->set("colormain", $niveau01->getColormain());
|
||||||
|
|
||||||
|
if(!is_null($niveau01->getFontcolorhover()))
|
||||||
|
$session->set("fontcolorhover", $niveau01->getFontcolorhover());
|
||||||
|
|
||||||
|
if(!is_null($niveau01->getColorbody()))
|
||||||
|
$session->set("colorbody", $niveau01->getColorbody());
|
||||||
|
|
||||||
|
if(!is_null($niveau01->getFontfacebody()))
|
||||||
|
$session->set("fontfacebody", $niveau01->getFontfacebody());
|
||||||
|
|
||||||
|
if(!is_null($niveau01->getFontfacetitle()))
|
||||||
|
$session->set("fontfacetitle", $niveau01->getFontfacetitle());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calcul des couleurs
|
||||||
|
$color = $this->container->get('cadoles.core.service.color');
|
||||||
|
$color->setColor();
|
||||||
|
|
||||||
|
// Visite
|
||||||
if($curentuser!="anon.") {
|
if($curentuser!="anon.") {
|
||||||
$now=new \DateTime();
|
$now=new \DateTime();
|
||||||
if(!$curentuser->getVisitedate()) {
|
if(!$curentuser->getVisitedate()) {
|
||||||
|
|
|
@ -57,7 +57,68 @@ class Niveau01Type extends AbstractType
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$choices=array(
|
||||||
|
"Helvetica" => "Helvetica",
|
||||||
|
"Peacesans" => "Peacesans",
|
||||||
|
"Acme-Regular" => "Acme-Regular",
|
||||||
|
"Redressed" => "Redressed",
|
||||||
|
"Roboto-Regular" => "Roboto-Regular",
|
||||||
|
"Justanotherhand-Regular" => "Justanotherhand-Regular",
|
||||||
|
"Lato-Regular" => "Lato-Regular",
|
||||||
|
|
||||||
|
"ABeeZee-Regular" => "ABeeZee-Regular",
|
||||||
|
"AlfaSlabOne-Regular" => "AlfaSlabOne-Regular",
|
||||||
|
"Anton-Regular" => "Anton-Regular",
|
||||||
|
"FredokaOne-Regular" => "FredokaOne-Regular",
|
||||||
|
"Overpass-Black" => "Overpass-Black",
|
||||||
|
"Righteous-Regular" => "Righteous-Regular",
|
||||||
|
"Signika-Regular" => "Signika-Regular",
|
||||||
|
"Teko-Bold" => "Teko-Bold",
|
||||||
|
"LuckiestGuy-Regular" => "LuckiestGuy-Regular",
|
||||||
|
|
||||||
|
"Baloo-Regular" => "Baloo-Regular",
|
||||||
|
"CarterOne-Regular" => "CarterOne-Regular",
|
||||||
|
"Chewy-Regular" => "Chewy-Regular",
|
||||||
|
"Courgette-Regular" => "Courgette-Regular",
|
||||||
|
"LexendDeca-Regular" => "LexendDeca-Regular",
|
||||||
|
"RubikMonoOne-Regular" => "RubikMonoOne-Regular",
|
||||||
|
"SigmarOne-Regular" => "SigmarOne-Regular",
|
||||||
|
"Viga-Regular" => "Viga-Regular",
|
||||||
|
);
|
||||||
|
|
||||||
|
$builder->add('colormain',
|
||||||
|
TextType::class,
|
||||||
|
array("label" => "Couleur principale",
|
||||||
|
"attr" => array("class" => "pick-a-color form-control"),
|
||||||
|
'required' => false));
|
||||||
|
|
||||||
|
$builder->add('fontcolorhover',
|
||||||
|
TextType::class,
|
||||||
|
array("label" => "Couleur de texte sur couleur Principale",
|
||||||
|
"attr" => array("class" => "pick-a-color form-control"),
|
||||||
|
'required' => false));
|
||||||
|
|
||||||
|
$builder->add('colorbody',
|
||||||
|
TextType::class,
|
||||||
|
array("label" => "Couleur de fond des pages",
|
||||||
|
"attr" => array("class" => "pick-a-color form-control"),
|
||||||
|
'required' => false));
|
||||||
|
|
||||||
|
$builder->add("fontfacebody", ChoiceType::class,
|
||||||
|
array("label" =>"Police principale",
|
||||||
|
"attr" => array("class" => "form-control"),
|
||||||
|
'required' => false,
|
||||||
|
"choices" => $choices));
|
||||||
|
|
||||||
|
$builder->add("fontfacetitle", ChoiceType::class,
|
||||||
|
array("label" =>"Police pour les titres",
|
||||||
|
"attr" => array("class" => "form-control"),
|
||||||
|
'required' => false,
|
||||||
|
"choices" => $choices));
|
||||||
|
|
||||||
|
|
||||||
$builder->add('logo',HiddenType::class);
|
$builder->add('logo',HiddenType::class);
|
||||||
|
$builder->add('header',HiddenType::class);
|
||||||
|
|
||||||
// Si masteridentity = LDAP alors on demande obligatoirement le filtre des utilisateurs qui appartiennent à ce niveau01
|
// Si masteridentity = LDAP alors on demande obligatoirement le filtre des utilisateurs qui appartiennent à ce niveau01
|
||||||
if($options["masteridentity"]=="LDAP")
|
if($options["masteridentity"]=="LDAP")
|
||||||
|
|
|
@ -18,6 +18,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Doctrine\ORM\EntityManager;
|
use Doctrine\ORM\EntityManager;
|
||||||
|
use Doctrine\ORM\Query\Expr\Join;
|
||||||
|
|
||||||
class Niveau02Type extends AbstractType
|
class Niveau02Type extends AbstractType
|
||||||
{
|
{
|
||||||
|
@ -31,16 +32,37 @@ class Niveau02Type extends AbstractType
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$builder->add('niveau01',
|
if($options["user"]->getRole()=="ROLE_MODO") {
|
||||||
EntityType::class,
|
$userid=$options["user"]->getId();
|
||||||
array(
|
$builder->add('niveau01',
|
||||||
"class" => "CadolesCoreBundle:Niveau01",
|
EntityType::class,
|
||||||
"label" => $session->get('labelniveau01'),
|
array(
|
||||||
"choice_label" => "label",
|
"class" => "CadolesCoreBundle:Niveau01",
|
||||||
"disabled" => ($options["mode"]!="submit"?true:false),
|
"label" => $session->get('labelniveau01'),
|
||||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]!="submit"?true:false))
|
"choice_label" => "label",
|
||||||
)
|
"disabled" => ($options["mode"]!="submit"?true:false),
|
||||||
);
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]!="submit"?true:false)),
|
||||||
|
"query_builder"=> function (EntityRepository $er) use($userid) {
|
||||||
|
$result=$er->createQueryBuilder("table")->innerJoin("CadolesCoreBundle:UserModo", "usermodo", Join::WITH, "table.id = usermodo.niveau01");
|
||||||
|
$result->andWhere("usermodo.user = :userid");
|
||||||
|
$result->setParameter('userid', $userid);
|
||||||
|
return $result;
|
||||||
|
},
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$builder->add('niveau01',
|
||||||
|
EntityType::class,
|
||||||
|
array(
|
||||||
|
"class" => "CadolesCoreBundle:Niveau01",
|
||||||
|
"label" => $session->get('labelniveau01'),
|
||||||
|
"choice_label" => "label",
|
||||||
|
"disabled" => ($options["mode"]!="submit"?true:false),
|
||||||
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]!="submit"?true:false))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$builder->add('label',
|
$builder->add('label',
|
||||||
TextType::class, array(
|
TextType::class, array(
|
||||||
|
@ -73,7 +95,8 @@ class Niveau02Type extends AbstractType
|
||||||
{
|
{
|
||||||
$resolver->setDefaults(array(
|
$resolver->setDefaults(array(
|
||||||
'data_class' => 'Cadoles\CoreBundle\Entity\Niveau02',
|
'data_class' => 'Cadoles\CoreBundle\Entity\Niveau02',
|
||||||
'mode' => "string"
|
'mode' => "string",
|
||||||
|
'user' => 'Cadoles\CoreBundle\Entity\User',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class RegistrationType extends AbstractType
|
||||||
TextType::class, array(
|
TextType::class, array(
|
||||||
"label" =>"Login",
|
"label" =>"Login",
|
||||||
"disabled" => ($options["mode"]=="submit"?false:true),
|
"disabled" => ($options["mode"]=="submit"?false:true),
|
||||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ class RegistrationType extends AbstractType
|
||||||
RepeatedType::class, array(
|
RepeatedType::class, array(
|
||||||
"type" => PasswordType::class,
|
"type" => PasswordType::class,
|
||||||
"required" => ($options["mode"]=="submit"?true:false),
|
"required" => ($options["mode"]=="submit"?true:false),
|
||||||
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")),
|
||||||
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -44,7 +44,7 @@ class UserType extends AbstractType
|
||||||
TextType::class, array(
|
TextType::class, array(
|
||||||
"label" =>"Login",
|
"label" =>"Login",
|
||||||
"disabled" => ($options["mode"]=="submit"?false:true),
|
"disabled" => ($options["mode"]=="submit"?false:true),
|
||||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ class UserType extends AbstractType
|
||||||
"type" => PasswordType::class,
|
"type" => PasswordType::class,
|
||||||
"required" => ($options["mode"]=="submit"?true:false),
|
"required" => ($options["mode"]=="submit"?true:false),
|
||||||
"options" => array("always_empty" => true),
|
"options" => array("always_empty" => true),
|
||||||
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")),
|
||||||
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -327,6 +327,9 @@ cadoles_core_config_niveau01_logo:
|
||||||
path: /config/niveau01/logo
|
path: /config/niveau01/logo
|
||||||
defaults: { _controller: CadolesCoreBundle:Niveau01:logo }
|
defaults: { _controller: CadolesCoreBundle:Niveau01:logo }
|
||||||
|
|
||||||
|
cadoles_core_config_niveau01_header:
|
||||||
|
path: /config/niveau01/header
|
||||||
|
defaults: { _controller: CadolesCoreBundle:Niveau01:header }
|
||||||
|
|
||||||
#== Niveau02 =============================================================================================================
|
#== Niveau02 =============================================================================================================
|
||||||
cadoles_core_config_niveau02:
|
cadoles_core_config_niveau02:
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{% set logo = "transnum-logo.png" %}
|
{% set logo = "transnum-logo.png" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
{% set fgheader = "" %}
|
||||||
{% set header = "transnum-header.png" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
{% set colormain = "2176ad" %}
|
{% set colormain = "" %}
|
||||||
{% set fontcolorhover = "" %}
|
{% set fontcolorhover = "" %}
|
||||||
{% set colorbody = "eeeeee" %}
|
{% set colorbody = "" %}
|
||||||
|
|
||||||
{% set fontfacetitle = "LexendDeca-Regular" %}
|
{% set fontfacetitle = "" %}
|
||||||
{% set fontfacebody = "" %}
|
{% set fontfacebody = "" %}
|
||||||
|
|
||||||
{{
|
{{
|
||||||
|
|
|
@ -14,7 +14,10 @@ body.simple {
|
||||||
border-color: #2e3339 !important;
|
border-color: #2e3339 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-pills {
|
||||||
|
background-color: #999999 !important;
|
||||||
|
border-color: #999999 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.grid .grid-small, .grid .grid-small .item-link {
|
.grid .grid-small, .grid .grid-small .item-link {
|
||||||
height: 130px;
|
height: 130px;
|
||||||
|
|
|
@ -53,15 +53,56 @@
|
||||||
{% if masteridentity=="SSO" %}
|
{% if masteridentity=="SSO" %}
|
||||||
{{ form_row(form.attributes) }}
|
{{ form_row(form.attributes) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="width:150px; margin:10px auto;">
|
<div class="row">
|
||||||
<img id="niveau01_logo_img" src="/{{ alias }}/{{ niveau01.logo }}" style="width:90px;height:auto;margin:auto;display:block;margin-bottom:5px;">
|
<div class="col-md-6">
|
||||||
{{ form_widget(form.logo) }}
|
<div class="panel panel-primary">
|
||||||
<a class="btn btn-info" style="width:150px" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Logo','{{ path('cadoles_core_config_niveau01_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
<div class="panel-heading">
|
||||||
<a class="btn btn-danger" onClick="delLogo()" title='Détacher' style="width:100%">Détacher le Logo</a>
|
<i class="fa fa-pencil fa-fw"></i> Logo
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div style="width:150px; margin:10px auto;">
|
||||||
|
<img id="niveau01_logo_img" src="/{{ alias }}/{{ niveau01.logo }}" style="width:90px;height:auto;margin:auto;display:block;margin-bottom:5px;">
|
||||||
|
{{ form_widget(form.logo) }}
|
||||||
|
<a class="btn btn-info" style="width:150px" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Logo','{{ path('cadoles_core_config_niveau01_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
||||||
|
<a class="btn btn-danger" onClick="delLogo()" title='Détacher' style="width:100%">Détacher le Logo</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="panel panel-primary">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-pencil fa-fw"></i> Style
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
{{ form_row(form.colormain) }}
|
||||||
|
{{ form_row(form.fontcolorhover) }}
|
||||||
|
{{ form_row(form.colorbody) }}
|
||||||
|
{{ form_row(form.fontfacebody) }}
|
||||||
|
{{ form_row(form.fontfacetitle) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-primary">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-pencil fa-fw"></i> Bannière
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div style="width:100%; margin:10px auto;">
|
||||||
|
<img id="niveau01_header_img" src="/{{ alias }}/{{ niveau01.header }}" style="width:100%;height:auto;margin:auto;display:block;margin-bottom:5px;">
|
||||||
|
{{ form_widget(form.header) }}
|
||||||
|
<a class="btn btn-info" style="width:100%" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Bannière','{{ path('cadoles_core_config_niveau01_header') }}');" title='Ajouter une Bannière'>Modifier</a>
|
||||||
|
<a class="btn btn-danger" onClick="delHeader()" title='Détacher' style="width:100%">Détacher la Bannière</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ form_end(form) }}
|
{{ form_end(form) }}
|
||||||
|
@ -72,4 +113,8 @@
|
||||||
$("#niveau01_logo_img").attr("src","");
|
$("#niveau01_logo_img").attr("src","");
|
||||||
$("#niveau01_logo").val(null);
|
$("#niveau01_logo").val(null);
|
||||||
}
|
}
|
||||||
|
function delHeader() {
|
||||||
|
$("#niveau01_header_img").attr("src","");
|
||||||
|
$("#niveau01_header").val(null);
|
||||||
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -0,0 +1,36 @@
|
||||||
|
{% extends '@CadolesCore/base.html.twig' %}
|
||||||
|
|
||||||
|
{% block pagewrapper %}
|
||||||
|
<h3 class="page-header">Téléchargez votre Bannière</h3>
|
||||||
|
<a class="btn btn-default" onClick="closeModal();">Annuler</a>
|
||||||
|
|
||||||
|
<form action="{{ oneup_uploader_endpoint('niveau01') }}" class="dropzone" id="MyDropZone" style="margin-top:10px">
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% block localjavascript %}
|
||||||
|
Dropzone.options.MyDropZone = {
|
||||||
|
acceptedMimeTypes: 'image/*',
|
||||||
|
maxFiles: 1,
|
||||||
|
resizeWidth:500,
|
||||||
|
|
||||||
|
success: function( file, response ){
|
||||||
|
parent.$("#niveau01_header").val("uploads/niveau01/"+response["file"]);
|
||||||
|
parent.$("#niveau01_header_img").attr("src","/{{ alias }}/uploads/niveau01/"+response["file"]);
|
||||||
|
closeModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal() {
|
||||||
|
window.parent.$("#mymodal").modal('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).load(function () {
|
||||||
|
// On vérifie que l'execution se fait bien dans le cadre d'une modal
|
||||||
|
if(!window.parent.$("#mymodal #framemodal").length) {
|
||||||
|
$(location).attr('href',"{{ path('cadoles_core_home') }}");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
{% endblock %}
|
|
@ -3,7 +3,9 @@
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
<h1 class="page-header">Gestion des {{ labelsniveau01 }} </h1>
|
<h1 class="page-header">Gestion des {{ labelsniveau01 }} </h1>
|
||||||
|
|
||||||
|
{% if is_granted('ROLE_ADMIN') %}
|
||||||
<p><a class="btn btn-success" href={{ path('cadoles_core_config_niveau01_submit') }}>Ajouter</a></p>
|
<p><a class="btn btn-success" href={{ path('cadoles_core_config_niveau01_submit') }}>Ajouter</a></p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|
|
@ -352,6 +352,23 @@ class BlogController extends Controller
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On recherche la premiere page associé au groupe du blog
|
||||||
|
$idpage=null;
|
||||||
|
$idgroup=null;
|
||||||
|
if($id!=0) {
|
||||||
|
$groups=$entity->getGroups();
|
||||||
|
if($groups[0]) {
|
||||||
|
if($groups[0]->getFgcanshare()) {
|
||||||
|
$pages=$groups[0]->getPages();
|
||||||
|
if($pages) {
|
||||||
|
$idpage=$pages[0]->getId();
|
||||||
|
$groups=$pages[0]->getGroups();
|
||||||
|
$idgroup=$groups[0]->getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
if($access=="config") {
|
if($access=="config") {
|
||||||
|
@ -402,7 +419,9 @@ class BlogController extends Controller
|
||||||
'blogs' => $blogs,
|
'blogs' => $blogs,
|
||||||
'countarticles' => $count,
|
'countarticles' => $count,
|
||||||
'pagination' => $pagination,
|
'pagination' => $pagination,
|
||||||
'page' => $page
|
'page' => $page,
|
||||||
|
'idpage' => $idpage,
|
||||||
|
'idgroup' => $idgroup
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,13 @@ class BlogarticleController extends Controller
|
||||||
$blog=$em->getRepository("CadolesPortalBundle:Blog")->find($idblog);
|
$blog=$em->getRepository("CadolesPortalBundle:Blog")->find($idblog);
|
||||||
if($blog) $entity->setBlog($blog);
|
if($blog) $entity->setBlog($blog);
|
||||||
|
|
||||||
|
$pageid=$request->get("page");
|
||||||
|
if($pageid) {
|
||||||
|
$page=$em->getRepository("CadolesPortalBundle:Page")->find($pageid);
|
||||||
|
$groups=$page->getGroups();
|
||||||
|
$idgroup=$groups[0]->getId();
|
||||||
|
}
|
||||||
|
|
||||||
$form = $this->entityForm($entity,$access);
|
$form = $this->entityForm($entity,$access);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
@ -68,7 +75,10 @@ class BlogarticleController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_blogarticle_view',["id"=>$entity->getId()]));
|
if(is_null($pageid))
|
||||||
|
return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_blogarticle_view',["id"=>$entity->getId()]));
|
||||||
|
else
|
||||||
|
return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view',["id"=>$pageid,"usage"=>"group","group"=>$idgroup]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render($this->labelentity.':edit.html.twig', [
|
return $this->render($this->labelentity.':edit.html.twig', [
|
||||||
|
@ -79,7 +89,8 @@ class BlogarticleController extends Controller
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
'mode' => "submit",
|
'mode' => "submit",
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'form' => $form->createView()
|
'form' => $form->createView(),
|
||||||
|
'pageid' => $pageid
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +171,21 @@ class BlogarticleController extends Controller
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
|
||||||
|
// On recherche la premiere page associé au groupe du blog
|
||||||
|
$groups=$entity->getBlog()->getGroups();
|
||||||
|
$idpage=null;
|
||||||
|
$idgroup=null;
|
||||||
|
if($groups[0]) {
|
||||||
|
if($groups[0]->getFgcanshare()) {
|
||||||
|
$pages=$groups[0]->getPages();
|
||||||
|
if($pages) {
|
||||||
|
$idpage=$pages[0]->getId();
|
||||||
|
$groups=$pages[0]->getGroups();
|
||||||
|
$idgroup=$groups[0]->getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
if($access=="config") {
|
if($access=="config") {
|
||||||
|
@ -200,7 +226,9 @@ class BlogarticleController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'canadd' => $canadd,
|
'canadd' => $canadd,
|
||||||
'blogs' => $blogs,
|
'blogs' => $blogs,
|
||||||
'blogarticles' => $blogarticles
|
'blogarticles' => $blogarticles,
|
||||||
|
'idpage' => $idpage,
|
||||||
|
'idgroup' => $idgroup,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,6 +332,23 @@ class CalendarController extends Controller
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On recherche la premiere page associé au groupe du calendrier
|
||||||
|
$idpage=null;
|
||||||
|
$idgroup=null;
|
||||||
|
if($id!=0) {
|
||||||
|
$groups=$entity->getGroups();
|
||||||
|
if($groups[0]) {
|
||||||
|
if($groups[0]->getFgcanshare()) {
|
||||||
|
$pages=$groups[0]->getPages();
|
||||||
|
if($pages) {
|
||||||
|
$idpage=$pages[0]->getId();
|
||||||
|
$groups=$pages[0]->getGroups();
|
||||||
|
$idgroup=$groups[0]->getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
if($access=="config") {
|
if($access=="config") {
|
||||||
$canupdate = true;
|
$canupdate = true;
|
||||||
|
@ -371,7 +388,10 @@ class CalendarController extends Controller
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'calendars' => $calendars
|
'calendars' => $calendars,
|
||||||
|
'idpage' => $idpage,
|
||||||
|
'idgroup' => $idgroup
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -517,18 +517,20 @@ class PageController extends Controller
|
||||||
|
|
||||||
// Compteur de visite
|
// Compteur de visite
|
||||||
if($this->getUser()) {
|
if($this->getUser()) {
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
if($groupid) {
|
||||||
if($group && $group->getFgcanshare()) {
|
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
||||||
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]);
|
if($group && $group->getFgcanshare()) {
|
||||||
if($usergroup) {
|
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]);
|
||||||
$visitedate=$usergroup->getVisitedate();
|
if($usergroup) {
|
||||||
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
|
$visitedate=$usergroup->getVisitedate();
|
||||||
$now=new \DateTime();
|
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
|
||||||
if($visitedate<$now) {
|
$now=new \DateTime();
|
||||||
$usergroup->setVisitedate($now);
|
if($visitedate<$now) {
|
||||||
$usergroup->setVisitecpt($usergroup->getVisitecpt()+1);
|
$usergroup->setVisitedate($now);
|
||||||
$em->persist($usergroup);
|
$usergroup->setVisitecpt($usergroup->getVisitecpt()+1);
|
||||||
$em->flush();
|
$em->persist($usergroup);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,9 +354,10 @@ class ProjectController extends Controller
|
||||||
|
|
||||||
// On recherche la premiere page associé au groupe du projet
|
// On recherche la premiere page associé au groupe du projet
|
||||||
$idpage=null;
|
$idpage=null;
|
||||||
|
$idgroup=null;
|
||||||
if($id!=0) {
|
if($id!=0) {
|
||||||
$groups=$entity->getGroups();
|
$groups=$entity->getGroups();
|
||||||
if($groups) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages) {
|
||||||
|
|
|
@ -202,7 +202,7 @@ class ProjecttaskController extends Controller
|
||||||
$groups=$entity->getProject()->getGroups();
|
$groups=$entity->getProject()->getGroups();
|
||||||
$idpage=null;
|
$idpage=null;
|
||||||
$idgroup=null;
|
$idgroup=null;
|
||||||
if($groups) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages) {
|
||||||
|
|
|
@ -11,7 +11,12 @@
|
||||||
<a href='{{ path('cadoles_portal_config_blog_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer'><i class='fa fa-trash fa-fw'></i></a>
|
<a href='{{ path('cadoles_portal_config_blog_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer'><i class='fa fa-trash fa-fw'></i></a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<br>
|
<div style="margin:10px 0px 10px 0px; text-align:left;height:34px;">
|
||||||
|
{% if not idpage is empty %}
|
||||||
|
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul class="nav navbar-default nav-pills">
|
<ul class="nav navbar-default nav-pills">
|
||||||
<li id="menublog-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
|
<li id="menublog-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
|
||||||
<a href="{{ path("cadoles_portal_user_blog_view") }}">
|
<a href="{{ path("cadoles_portal_user_blog_view") }}">
|
||||||
|
|
|
@ -19,7 +19,11 @@
|
||||||
{% set blogid=entity.blog.id %}
|
{% set blogid=entity.blog.id %}
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
<a class="btn btn-default" href='{{ path('cadoles_portal_'~access~'_blog_view',{'id':blogid})}}'>Annuler</a>
|
{% if pageid is empty %}
|
||||||
|
<a class="btn btn-default" href='{{ path('cadoles_portal_'~access~'_blog_view',{'id':blogid})}}'>Annuler</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-default" href="{{path('cadoles_core_home',{id:pageid})}}" target="_top">Annuler</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
|
|
|
@ -31,7 +31,12 @@
|
||||||
<a href="{{ path('cadoles_portal_config_blog_view', {id:entity.blog.id})}}">{{ entity.blog.name }}</a>
|
<a href="{{ path('cadoles_portal_config_blog_view', {id:entity.blog.id})}}">{{ entity.blog.name }}</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<br>
|
<div style="margin:10px 0px 10px 0px; text-align:left; height:34px">
|
||||||
|
{% if not idpage is empty %}
|
||||||
|
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul class="nav navbar-default nav-pills">
|
<ul class="nav navbar-default nav-pills">
|
||||||
<li id="menublog-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
|
<li id="menublog-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
|
||||||
<a href="{{ path("cadoles_portal_user_blog_view") }}">
|
<a href="{{ path("cadoles_portal_user_blog_view") }}">
|
||||||
|
|
|
@ -10,21 +10,33 @@
|
||||||
<a href='{{ path('cadoles_portal_config_calendar_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer le panel'><i class='fa fa-trash fa-fw'></i></a>
|
<a href='{{ path('cadoles_portal_config_calendar_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer le panel'><i class='fa fa-trash fa-fw'></i></a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<br>
|
<div style="margin:10px 0px 10px 0px; text-align:left;height:34px;">
|
||||||
|
{% if not idpage is empty %}
|
||||||
|
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul class="nav navbar-default nav-pills">
|
<ul class="nav navbar-default nav-pills">
|
||||||
<li id="menucalendar-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer"><a onClick="showCalendar(0,{{ canupdate }})">Tout</a></li>
|
<li id="menucalendar-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
|
||||||
|
<a href="{{ path("cadoles_portal_user_calendar_view") }}">
|
||||||
|
Tout
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
{% for calendar in calendars %}
|
{% for calendar in calendars %}
|
||||||
<li id="menucalendar-{{calendar.id}}" data-open="{% if calendar.canupdate %}true{%endif%}" class="{% if entity.id is defined and entity.id==calendar.id%}active{%endif%}" style="cursor:pointer">
|
<li id="menucalendar-{{calendar.id}}" data-open="{% if calendar.canupdate %}true{%endif%}" class="{% if entity.id is defined and entity.id==calendar.id%}active{%endif%}" style="cursor:pointer">
|
||||||
<a onClick="showCalendar({{ calendar.id }},{{ calendar.canupdate }})">
|
|
||||||
|
|
||||||
|
<a href="{{ path("cadoles_portal_user_calendar_view",{'id':calendar.id}) }}">
|
||||||
{% if not calendar.groups is empty %}
|
{% if not calendar.groups is empty %}
|
||||||
<i class="fa fa-users fa-fw"></i>
|
<i class="fa fa-users fa-fw"></i>
|
||||||
{% elseif app.user==calendar.user %}
|
{% elseif app.user==calendar.user %}
|
||||||
<i class="fa fa-user fa-fw"></i>
|
<i class="fa fa-user fa-fw"></i>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
{{ calendar.name }}
|
{{ calendar.name }}
|
||||||
{% if not calendar.canupdate %}
|
{% if calendar.canupdate %}
|
||||||
|
<i class="fa fa-pencil"></i>
|
||||||
|
{% else %}
|
||||||
<i class="fa fa-lock"></i>
|
<i class="fa fa-lock"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -29,11 +29,12 @@
|
||||||
<a title="Gérer mes Blogs" href='{{ path('cadoles_portal_config_blog') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
<a title="Gérer mes Blogs" href='{{ path('cadoles_portal_config_blog') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set idblog = "" %}
|
{% set idblog = "" %}
|
||||||
{% set url= path('cadoles_portal_user_blog_view') %}
|
{% set url= path('cadoles_portal_user_blogarticle_submit') %}
|
||||||
{% if usage=="group" and firstblog is defined %}
|
{% if usage=="group" and firstblog is defined %}
|
||||||
{% set url= path('cadoles_portal_user_blog_view',{id:firstblog}) %}
|
{% set url= path('cadoles_portal_user_blogarticle_submit',{idblog:firstblog,page:entity.page.id}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a title="Gérer mes Blogs" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
|
||||||
|
<a title="Créer un Article" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{% if usage=="group" and firstcalendar is defined %}
|
{% if usage=="group" and firstcalendar is defined %}
|
||||||
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
|
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a title="Gérer mes Calendriers" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
<a title="Gérer mes Calendriers" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
{% if colorbodyfont is null %}
|
{% if colorbodyfont is null %}
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set colorbody = color['colorbody'] %}
|
||||||
|
{% set colormain = color['main'] %}
|
||||||
|
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
||||||
|
@ -37,7 +39,7 @@
|
||||||
|
|
||||||
{% if onheader %}
|
{% if onheader %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -51,7 +53,7 @@
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
||||||
{% if group is not null %}
|
{% if group is not null %}
|
||||||
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont})) }}
|
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!--
|
<!--
|
||||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
{% if projecttask.projecttasktag %}
|
{% if projecttask.projecttasktag %}
|
||||||
{% set colortask = projecttask.projecttasktag.color %}
|
{% set colortask = projecttask.projecttasktag.color %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="grid-item-content" style="background-color:#{{ colortask }}">
|
<div class="grid-item-content" style="background-color:#{{ colortask }}; {%if not entity.border%}padding:5px;{%endif%}">
|
||||||
<a title="Voir la Tâche" href="{{ path('cadoles_portal_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
|
<a title="Voir la Tâche" href="{{ path('cadoles_portal_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
Modification Project
|
Modification Projet
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Création Project
|
Création Projet
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,16 @@
|
||||||
<a href='{{ path('cadoles_portal_config_project_writer', {id:entity.id}) }}' title='Permission'><i class='fa fa-users fa-fw'></i></a>
|
<a href='{{ path('cadoles_portal_config_project_writer', {id:entity.id}) }}' title='Permission'><i class='fa fa-users fa-fw'></i></a>
|
||||||
<a href='{{ path('cadoles_portal_config_project_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer'><i class='fa fa-trash fa-fw'></i></a>
|
<a href='{{ path('cadoles_portal_config_project_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer'><i class='fa fa-trash fa-fw'></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%">
|
{% if access!="config" %}
|
||||||
{% if not idpage is empty %}
|
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%">
|
||||||
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
{% if not idpage is empty %}
|
||||||
{% endif %}
|
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
||||||
</div>
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div style="margin:10px 0px 10px 0px; text-align:right; display:inline-block;width:50%">
|
<div style="margin:10px 0px 10px 0px; text-align:right; display:inline-block;width:50%">
|
||||||
<label for="alltask" class="control-label">Afficher les tâches fermées</label>
|
<label for="alltask" class="control-label">Afficher les tâches fermées</label>
|
||||||
|
|
|
@ -32,11 +32,16 @@ class ChatController extends Controller
|
||||||
$colorbodyback=$request->query->get('colorbodyback');
|
$colorbodyback=$request->query->get('colorbodyback');
|
||||||
$colorbodyfont=$request->query->get('colorbodyfont');
|
$colorbodyfont=$request->query->get('colorbodyfont');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$colorbody=$request->query->get('colorbody');
|
||||||
|
$colormain=$request->query->get('colormain');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$border=false;
|
$border=false;
|
||||||
$colorbodyback=$this->get('session')->get('color')["main"];
|
$colorbodyback=$this->get('session')->get('color')["main"];
|
||||||
$colorbodyfont=$this->get('session')->get('color')["fontcolorhover"];
|
$colorbodyfont=$this->get('session')->get('color')["fontcolorhover"];
|
||||||
|
$colorbody=$this->get('session')->get('color')["colorbody"];
|
||||||
|
$colormain=$this->get('session')->get('color')["main"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -101,6 +106,8 @@ class ChatController extends Controller
|
||||||
'border' => $border,
|
'border' => $border,
|
||||||
'colorbodyback' => $colorbodyback,
|
'colorbodyback' => $colorbodyback,
|
||||||
'colorbodyfont' => $colorbodyfont,
|
'colorbodyfont' => $colorbodyfont,
|
||||||
|
'colorbody' => $colorbody,
|
||||||
|
'colormain' => $colormain,
|
||||||
'ingroup' => ($usergroup),
|
'ingroup' => ($usergroup),
|
||||||
'fgmanager' => ($usergroup&&($usergroup->getFgmanager()||$user->getRole()=="ROLE_ADMIN"||$user->getRole()=="ROLE_MODO")),
|
'fgmanager' => ($usergroup&&($usergroup->getFgmanager()||$user->getRole()=="ROLE_ADMIN"||$user->getRole()=="ROLE_MODO")),
|
||||||
'form' => $form->createView()
|
'form' => $form->createView()
|
||||||
|
|
|
@ -89,16 +89,24 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
|
{% set colorlabel= colormain %}
|
||||||
|
{% if border %}
|
||||||
|
{% set colorlabel = colorbody %}
|
||||||
|
{% endif %}
|
||||||
|
{% if colorbody==colorbodyfont %}
|
||||||
|
{% set colorlabel = colorbodyback %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if app.user and ingroup %}
|
{% if app.user and ingroup %}
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<div id="topchat" class='row'>
|
<div id="topchat" class='row'>
|
||||||
{{ form_widget(form.message) }}
|
{{ form_widget(form.message) }}
|
||||||
<input id="sendbymail" type="checkbox" style="float:right" class='switch' ></input>
|
<input id="sendbymail" type="checkbox" style="float:right" class='switch' ></input>
|
||||||
<label class="custom-control-label" for="sendbymail" style="color:#{{ colorbodyfont }}">Envoyer par Mail ?</label>
|
<label class="custom-control-label" for="sendbymail" style="color:#{{ colorlabel }}">Envoyer par Mail ?</label>
|
||||||
<a id="sendbtn" class="btn btn-success" style="margin-top:5px; width:100%; margin-bottom:15px">Envoyer</a>
|
<a id="sendbtn" class="btn btn-success" style="margin-top:5px; width:100%; margin-bottom:15px">Envoyer</a>
|
||||||
<div id="useronline" style="margin-bottom:10px"></div>
|
<div id="useronline" style="margin-bottom:10px"></div>
|
||||||
<input id="unsee" type="checkbox" style="float:right" class='switch' onChange="switchsee()"></input>
|
<input id="unsee" type="checkbox" style="float:right" class='switch' onChange="switchsee()"></input>
|
||||||
<label class="custom-control-label" for="unsee" style="color:#{{ colorbodyfont }}">Afficher les messages masqués ?</label>
|
<label class="custom-control-label" for="unsee" style="color:#{{ colorlabel }}">Afficher les messages masqués ?</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -733,10 +741,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function addOnline(userid, useravatar, userlastname, userfirstname) {
|
function addOnline(userid, useravatar, userlastname, userfirstname) {
|
||||||
|
{% set colorlabel= colormain %}
|
||||||
|
{% if border %}
|
||||||
|
{% set colorlabel = colorbody %}
|
||||||
|
{% endif %}
|
||||||
|
{% if colorbody==colorbodyfont %}
|
||||||
|
{% set colorlabel = colorbodyback %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
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:#{{colorbodyfont}}'>"+userlastname+" "+userfirstname+"</span>";
|
html+= "<span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>";
|
||||||
html+= "</span>";
|
html+= "</span>";
|
||||||
$("#useronline").append(html);
|
$("#useronline").append(html);
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ INSERT IGNORE permmodo (`route`, `visible`) VALUES
|
||||||
('cadoles_core_config_datauser',0),
|
('cadoles_core_config_datauser',0),
|
||||||
('cadoles_core_config_datausers',0),
|
('cadoles_core_config_datausers',0),
|
||||||
('cadoles_core_config_whitelist',0),
|
('cadoles_core_config_whitelist',0),
|
||||||
('cadoles_core_config_niveau01',0),
|
('cadoles_core_config_niveau01',1),
|
||||||
('cadoles_core_config_niveau02',1),
|
('cadoles_core_config_niveau02',1),
|
||||||
('cadoles_core_config_group',1),
|
('cadoles_core_config_group',1),
|
||||||
('cadoles_core_config_registration',1),
|
('cadoles_core_config_registration',1),
|
||||||
|
@ -140,6 +140,7 @@ INSERT IGNORE permmodo (`route`, `visible`) VALUES
|
||||||
('cadoles_portal_config_alert',1),
|
('cadoles_portal_config_alert',1),
|
||||||
('cadoles_portal_config_calendar',1),
|
('cadoles_portal_config_calendar',1),
|
||||||
('cadoles_portal_config_blog',1),
|
('cadoles_portal_config_blog',1),
|
||||||
|
('cadoles_portal_config_project',1),
|
||||||
('cadoles_portal_config_flux',1),
|
('cadoles_portal_config_flux',1),
|
||||||
('cadoles_portal_config_notice',1),
|
('cadoles_portal_config_notice',1),
|
||||||
('cadoles_portal_config_icon',1),
|
('cadoles_portal_config_icon',1),
|
||||||
|
|
|
@ -321,6 +321,9 @@ parameters:
|
||||||
%end if
|
%end if
|
||||||
%else
|
%else
|
||||||
activate_widonlyoffice: false
|
activate_widonlyoffice: false
|
||||||
|
widonlyoffice_url:
|
||||||
|
widonlyoffice_user:
|
||||||
|
widonlyoffice_password:
|
||||||
widonlyoffice_sync: false
|
widonlyoffice_sync: false
|
||||||
%end if
|
%end if
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue