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

This commit is contained in:
Arnaud Fornerot 2020-06-24 09:54:52 +02:00
commit 50ae3ed4c4
37 changed files with 746 additions and 107 deletions

View File

@ -194,8 +194,9 @@ class PurgeFileCommand extends Command
foreach (iterator_to_array($finder) as $file) {
$name = $file->getRelativePathname();
if($name!="logo.png") {
$entity=$this->em->getRepository("CadolesCoreBundle:Niveau01")->findBy(["logo"=>"uploads/niveau01/".$name]);
if(!$entity) {
$logo=$this->em->getRepository("CadolesCoreBundle:Niveau01")->findBy(["logo"=>"uploads/niveau01/".$name]);
$header=$this->em->getRepository("CadolesCoreBundle:Niveau01")->findBy(["header"=>"uploads/niveau01/".$name]);
if(!$logo&&!$header) {
$this->writeln($name);
$url=$directory."/".$name;
if($fs->exists($url)) {

View File

@ -1189,6 +1189,11 @@ class GroupController extends Controller
$em->persist($pages[0]);
$em->flush();
}
foreach($pages as $page) {
$page->setUser($group->getOwner());
$em->persist($page);
$em->flush();
}
// On regarde s'il a au moins un calendrier
if($group->getCalendars()->isEmpty()) {
@ -1212,6 +1217,11 @@ class GroupController extends Controller
$em->persist($calendars[0]);
$em->flush();
}
foreach($calendars as $calendar) {
$calendar->setUser($group->getOwner());
$em->persist($calendar);
$em->flush();
}
}
// On regarde s'il a au moins un blog
@ -1232,6 +1242,11 @@ class GroupController extends Controller
$em->persist($blogs[0]);
$em->flush();
}
foreach($blogs as $blog) {
$blog->setUser($group->getOwner());
$em->persist($blog);
$em->flush();
}
}
// On regarde s'il a au moins un project
@ -1252,6 +1267,11 @@ class GroupController extends Controller
$em->persist($projects[0]);
$em->flush();
}
foreach($projects as $project) {
$project->setUser($group->getOwner());
$em->persist($project);
$em->flush();
}
}
}
}

View File

@ -43,20 +43,35 @@ class Niveau01Controller extends Controller
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Modo ?
$ismodo=false;
if($this->getUser()->getRole()=="ROLE_MODO") {
$ismodo=true;
}
// 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é
if($search["value"]=="")
$totalf = $total;
else {
$totalf= $em->createQueryBuilder()
$qb = $em->createQueryBuilder()
->select('COUNT(table)')
->from($this->labelentity,'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
->setParameter("value", "%".$search["value"]."%");
if($ismodo)
$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
@ -70,8 +85,15 @@ class Niveau01Controller extends Controller
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$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"]!="") {
$qb ->where('table.label LIKE :value')
$qb ->andwhere('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
switch($order[0]["column"]) {
@ -84,7 +106,7 @@ class Niveau01Controller extends Controller
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>";
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()));
}
@ -97,6 +119,10 @@ class Niveau01Controller extends Controller
// Initialisation de l'enregistrement
$data = new Niveau01();
// Interdit pour les modos
if($this->getUser()->getRole()=="ROLE_MODO")
throw $this->createNotFoundException('Permission denied');
// Création du formulaire
$form = $this->createForm(Niveau01Type::class,$data,array(
"mode" => "submit",
@ -136,10 +162,16 @@ class Niveau01Controller extends Controller
public function updateAction($id,Request $request)
{
$em = $this->getDoctrine()->getManager();
// Récupération de l'enregistrement courant
$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
$form = $this->createForm(Niveau01Type::class,$data,array(
@ -156,7 +188,6 @@ class Niveau01Controller extends Controller
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Sauvegarde
@ -184,7 +215,9 @@ class Niveau01Controller extends Controller
// Récupération de l'enregistrement courant
$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
$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()
{
$em = $this->getDoctrine()->getManager();

View File

@ -43,22 +43,45 @@ class Niveau02Controller extends Controller
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Modo ?
$ismodo=false;
if($this->getUser()->getRole()=="ROLE_MODO") {
$ismodo=true;
}
// 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é
if($search["value"]=="")
$totalf = $total;
else {
$totalf= $em->createQueryBuilder()
$qb = $em ->createQueryBuilder()
->select('COUNT(table)')
->from($this->labelentity,'table')
->from("CadolesCoreBundle:Niveau01",'nv1')
->where('table.niveau01=nv1.id')
->andwhere('table.label LIKE :value or nv1.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
->setParameter("value", "%".$search["value"]."%");
if($ismodo) {
$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
@ -79,6 +102,13 @@ class Niveau02Controller extends Controller
$qb ->andwhere('table.label LIKE :value or nv1.label LIKE :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"]) {
case 1 :
$qb->orderBy('nv1.label',$order[0]["dir"]);
@ -107,7 +137,7 @@ class Niveau02Controller extends Controller
$data = new Niveau02();
// 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
$form->handleRequest($request);
@ -141,13 +171,19 @@ class Niveau02Controller extends Controller
public function updateAction($id,Request $request)
{
$em = $this->getDoctrine()->getManager();
// Récupération de l'enregistrement courant
$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
$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
$form->handleRequest($request);
@ -157,7 +193,6 @@ class Niveau02Controller extends Controller
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Sauvegarde
@ -182,13 +217,19 @@ class Niveau02Controller extends Controller
public function deleteAction($id,Request $request)
{
$em = $this->getDoctrine()->getManager();
// Récupération de l'enregistrement courant
$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
$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
$form->handleRequest($request);
@ -198,7 +239,6 @@ class Niveau02Controller extends Controller
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();

View File

@ -702,7 +702,17 @@ class UserController extends Controller
// Vérifier que cet enregistrement est supprimable
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
$form = $this->createForm(UserType::class,$data,array(
@ -722,6 +732,37 @@ class UserController extends Controller
// Sur validation
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->flush();

View File

@ -44,6 +44,36 @@ class Niveau01
*/
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)
*/
@ -465,4 +495,148 @@ class Niveau01
{
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;
}
}

View File

@ -54,11 +54,6 @@
$session->set($config->getId(), strval($config->getValue()));
}
// Calcul des couleurs
$color = $this->container->get('cadoles.core.service.color');
$color->setColor();
// Utilisateur en cours
$curentuserid=0;
$token = $this->token_storage->getToken();
@ -283,10 +278,33 @@
if(!is_null($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.") {
$now=new \DateTime();
if(!$curentuser->getVisitedate()) {

View File

@ -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('header',HiddenType::class);
// Si masteridentity = LDAP alors on demande obligatoirement le filtre des utilisateurs qui appartiennent à ce niveau01
if($options["masteridentity"]=="LDAP")

View File

@ -18,6 +18,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Query\Expr\Join;
class Niveau02Type extends AbstractType
{
@ -31,16 +32,37 @@ class Niveau02Type extends AbstractType
)
);
$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))
)
);
if($options["user"]->getRole()=="ROLE_MODO") {
$userid=$options["user"]->getId();
$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)),
"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',
TextType::class, array(
@ -73,7 +95,8 @@ class Niveau02Type extends AbstractType
{
$resolver->setDefaults(array(
'data_class' => 'Cadoles\CoreBundle\Entity\Niveau02',
'mode' => "string"
'mode' => "string",
'user' => 'Cadoles\CoreBundle\Entity\User',
));
}
}

View File

@ -52,7 +52,7 @@ class RegistrationType extends AbstractType
TextType::class, array(
"label" =>"Login",
"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(
"type" => PasswordType::class,
"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"))
)
);

View File

@ -44,7 +44,7 @@ class UserType extends AbstractType
TextType::class, array(
"label" =>"Login",
"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,
"required" => ($options["mode"]=="submit"?true:false),
"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"))
)
);

View File

@ -327,6 +327,9 @@ cadoles_core_config_niveau01_logo:
path: /config/niveau01/logo
defaults: { _controller: CadolesCoreBundle:Niveau01:logo }
cadoles_core_config_niveau01_header:
path: /config/niveau01/header
defaults: { _controller: CadolesCoreBundle:Niveau01:header }
#== Niveau02 =============================================================================================================
cadoles_core_config_niveau02:

View File

@ -1,14 +1,14 @@
{% set logo = "transnum-logo.png" %}
{% set fgheader = "" %}
{% set header = "transnum-header.png" %}
{% set header = "" %}
{% set heightheader = "" %}
{% set colormain = "2176ad" %}
{% set colormain = "" %}
{% set fontcolorhover = "" %}
{% set colorbody = "eeeeee" %}
{% set colorbody = "" %}
{% set fontfacetitle = "LexendDeca-Regular" %}
{% set fontfacetitle = "" %}
{% set fontfacebody = "" %}
{{

View File

@ -14,7 +14,10 @@ body.simple {
border-color: #2e3339 !important;
}
.nav-pills {
background-color: #999999 !important;
border-color: #999999 !important;
}
.grid .grid-small, .grid .grid-small .item-link {
height: 130px;

View File

@ -53,15 +53,56 @@
{% if masteridentity=="SSO" %}
{{ form_row(form.attributes) }}
{% endif %}
</div>
</div>
<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 class="row">
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-pencil fa-fw"></i> Logo
</div>
</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 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>
{{ form_end(form) }}
@ -72,4 +113,8 @@
$("#niveau01_logo_img").attr("src","");
$("#niveau01_logo").val(null);
}
function delHeader() {
$("#niveau01_header_img").attr("src","");
$("#niveau01_header").val(null);
}
{% endblock %}

View File

@ -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 %}

View File

@ -3,7 +3,9 @@
{% block pagewrapper %}
<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>
{% endif %}
<div class="panel panel-primary">
<div class="panel-heading">

View File

@ -352,6 +352,23 @@ class BlogController extends Controller
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
$user=$this->getUser();
if($access=="config") {
@ -402,7 +419,9 @@ class BlogController extends Controller
'blogs' => $blogs,
'countarticles' => $count,
'pagination' => $pagination,
'page' => $page
'page' => $page,
'idpage' => $idpage,
'idgroup' => $idgroup
]);
}

View File

@ -44,6 +44,13 @@ class BlogarticleController extends Controller
$entity = new Blogarticle();
$blog=$em->getRepository("CadolesPortalBundle:Blog")->find($idblog);
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->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', [
@ -79,7 +89,8 @@ class BlogarticleController extends Controller
'entity' => $entity,
'mode' => "submit",
'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);
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
$user=$this->getUser();
if($access=="config") {
@ -200,7 +226,9 @@ class BlogarticleController extends Controller
'canupdate' => $canupdate,
'canadd' => $canadd,
'blogs' => $blogs,
'blogarticles' => $blogarticles
'blogarticles' => $blogarticles,
'idpage' => $idpage,
'idgroup' => $idgroup,
]);
}

View File

@ -332,6 +332,23 @@ class CalendarController extends Controller
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
if($access=="config") {
$canupdate = true;
@ -371,7 +388,10 @@ class CalendarController extends Controller
'entity' => $entity,
'access' => $access,
'canupdate' => $canupdate,
'calendars' => $calendars
'calendars' => $calendars,
'idpage' => $idpage,
'idgroup' => $idgroup
]);
}

View File

@ -517,21 +517,23 @@ class PageController extends Controller
// Compteur de visite
if($this->getUser()) {
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
if($group && $group->getFgcanshare()) {
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) {
$visitedate=$usergroup->getVisitedate();
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
$now=new \DateTime();
if($visitedate<$now) {
$usergroup->setVisitedate($now);
$usergroup->setVisitecpt($usergroup->getVisitecpt()+1);
$em->persist($usergroup);
$em->flush();
}
}
}
if($groupid) {
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
if($group && $group->getFgcanshare()) {
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]);
if($usergroup) {
$visitedate=$usergroup->getVisitedate();
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
$now=new \DateTime();
if($visitedate<$now) {
$usergroup->setVisitedate($now);
$usergroup->setVisitecpt($usergroup->getVisitecpt()+1);
$em->persist($usergroup);
$em->flush();
}
}
}
}
}
// Type Calendrier

View File

@ -354,9 +354,10 @@ class ProjectController extends Controller
// On recherche la premiere page associé au groupe du projet
$idpage=null;
$idgroup=null;
if($id!=0) {
$groups=$entity->getGroups();
if($groups) {
if($groups[0]) {
if($groups[0]->getFgcanshare()) {
$pages=$groups[0]->getPages();
if($pages) {

View File

@ -202,7 +202,7 @@ class ProjecttaskController extends Controller
$groups=$entity->getProject()->getGroups();
$idpage=null;
$idgroup=null;
if($groups) {
if($groups[0]) {
if($groups[0]->getFgcanshare()) {
$pages=$groups[0]->getPages();
if($pages) {

View File

@ -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>
</div>
{% 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">
<li id="menublog-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
<a href="{{ path("cadoles_portal_user_blog_view") }}">

View File

@ -19,7 +19,11 @@
{% set blogid=entity.blog.id %}
{%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 %}
{% if mode=="update" %}

View File

@ -31,7 +31,12 @@
<a href="{{ path('cadoles_portal_config_blog_view', {id:entity.blog.id})}}">{{ entity.blog.name }}</a>
</div>
{% 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">
<li id="menublog-0" class="{% if entity.id is not defined %}active{%endif%}" style="cursor:pointer">
<a href="{{ path("cadoles_portal_user_blog_view") }}">

View File

@ -10,24 +10,36 @@
<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>
{% 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">
<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 %}
<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 %}
<i class="fa fa-users fa-fw"></i>
{% elseif app.user==calendar.user %}
<i class="fa fa-user fa-fw"></i>
{%endif%}
{{ calendar.name }}
{% if not calendar.canupdate %}
{% if calendar.canupdate %}
<i class="fa fa-pencil"></i>
{% else %}
<i class="fa fa-lock"></i>
{% endif %}
</a>
</a>
</li>
{% endfor %}

View File

@ -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>
{% else %}
{% 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 %}
{% 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 %}
<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 %}
</div>

View File

@ -30,7 +30,7 @@
{% if usage=="group" and firstcalendar is defined %}
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
{% 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 %}
</div>

View File

@ -22,6 +22,8 @@
{% if colorbodyfont is null %}
{% set colorbodyfont = color['fontcolorhover'] %}
{% endif %}
{% set colorbody = color['colorbody'] %}
{% set colormain = color['main'] %}
{% if app.user %}
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
@ -37,7 +39,7 @@
{% if onheader %}
<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>
{% else %}
<div class="widgetheader" style="{{ stylewidgetheader }}">
@ -51,7 +53,7 @@
<div class="widgetbody" style="{{ stylewidgetbodyframe }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
{% 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 %}
<!--
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>

View File

@ -60,7 +60,7 @@
{% if projecttask.projecttasktag %}
{% set colortask = projecttask.projecttasktag.color %}
{% 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}) }}">
<div class="item-link clearfix">

View File

@ -4,9 +4,9 @@
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Project
Modification Projet
{% elseif mode=="submit" %}
Création Project
Création Projet
{% endif %}
</h1>

View File

@ -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_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 style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%"></div>
{% endif %}
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%">
{% 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>
{% if access!="config" %}
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%">
{% 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>
{% endif %}
<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>

View File

@ -32,11 +32,16 @@ class ChatController extends Controller
$colorbodyback=$request->query->get('colorbodyback');
$colorbodyfont=$request->query->get('colorbodyfont');
}
$colorbody=$request->query->get('colorbody');
$colormain=$request->query->get('colormain');
}
else {
$border=false;
$colorbodyback=$this->get('session')->get('color')["main"];
$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();
@ -101,6 +106,8 @@ class ChatController extends Controller
'border' => $border,
'colorbodyback' => $colorbodyback,
'colorbodyfont' => $colorbodyfont,
'colorbody' => $colorbody,
'colormain' => $colormain,
'ingroup' => ($usergroup),
'fgmanager' => ($usergroup&&($usergroup->getFgmanager()||$user->getRole()=="ROLE_ADMIN"||$user->getRole()=="ROLE_MODO")),
'form' => $form->createView()

View File

@ -89,16 +89,24 @@
{% endblock %}
{% block pagewrapper %}
{% set colorlabel= colormain %}
{% if border %}
{% set colorlabel = colorbody %}
{% endif %}
{% if colorbody==colorbodyfont %}
{% set colorlabel = colorbodyback %}
{% endif %}
{% if app.user and ingroup %}
{{ form_start(form) }}
<div id="topchat" class='row'>
{{ form_widget(form.message) }}
<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>
<div id="useronline" style="margin-bottom:10px"></div>
<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>
@ -733,10 +741,19 @@
}
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) {
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+= "<span style='color:#{{colorbodyfont}}'>"+userlastname+" "+userfirstname+"</span>";
html+= "<span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>";
html+= "</span>";
$("#useronline").append(html);
}

View File

@ -129,7 +129,7 @@ INSERT IGNORE permmodo (`route`, `visible`) VALUES
('cadoles_core_config_datauser',0),
('cadoles_core_config_datausers',0),
('cadoles_core_config_whitelist',0),
('cadoles_core_config_niveau01',0),
('cadoles_core_config_niveau01',1),
('cadoles_core_config_niveau02',1),
('cadoles_core_config_group',1),
('cadoles_core_config_registration',1),
@ -140,6 +140,7 @@ INSERT IGNORE permmodo (`route`, `visible`) VALUES
('cadoles_portal_config_alert',1),
('cadoles_portal_config_calendar',1),
('cadoles_portal_config_blog',1),
('cadoles_portal_config_project',1),
('cadoles_portal_config_flux',1),
('cadoles_portal_config_notice',1),
('cadoles_portal_config_icon',1),

View File

@ -321,6 +321,9 @@ parameters:
%end if
%else
activate_widonlyoffice: false
widonlyoffice_url:
widonlyoffice_user:
widonlyoffice_password:
widonlyoffice_sync: false
%end if