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

This commit is contained in:
Arnaud Fornerot 2020-07-15 16:57:37 +02:00
commit af5fbf0a6a
35 changed files with 170 additions and 49 deletions

View File

@ -74,6 +74,8 @@
<variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre annuaire"><value>non</value></variable> <variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre annuaire"><value>non</value></variable>
<variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable> <variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
<variable type='oui/non' name='ninegate_scribegroup' description="Considérer les classes/options comme des groupes de travail"><value>oui</value></variable>
<variable type='oui/non' name='ninegate_scribemaster' description="Placer les professeurs comme manager des groupes classes/options"><value>oui</value></variable>
<variable type='string' name='ninegate_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable> <variable type='string' name='ninegate_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable>
<variable type='string' name='ninegate_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable> <variable type='string' name='ninegate_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable>
@ -398,6 +400,8 @@
<target type='variable'>ninegate_syncldap</target> <target type='variable'>ninegate_syncldap</target>
<target type='variable'>ninegate_ldaptemplate</target> <target type='variable'>ninegate_ldaptemplate</target>
<target type='variable'>ninegate_scribegroup</target>
<target type='variable'>ninegate_scribemaster</target>
<target type='variable'>ninegate_pwdadmin</target> <target type='variable'>ninegate_pwdadmin</target>
<target type='variable'>ninegate_organization</target> <target type='variable'>ninegate_organization</target>
@ -517,6 +521,17 @@
</auto> </auto>
<!-- AFFICHAGE EN FONCTION DU MODE SCRIBE -->
<condition name='hidden_if_not_in' source='ninegate_ldaptemplate'>
<param>scribe</param>
<target type='variable'>ninegate_scribegroup</target>
<target type='variable'>ninegate_scribemaster</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODULE PORTAL --> <!-- AFFICHAGE EN FONCTION DU MODULE PORTAL -->
<condition name='hidden_if_in' source='ninegate_activate_portal'> <condition name='hidden_if_in' source='ninegate_activate_portal'>
<param>non</param> <param>non</param>

View File

@ -101,6 +101,8 @@ class SynchroCommand extends Command
$ldap_lastname = $this->container->getParameter('ldap_lastname'); $ldap_lastname = $this->container->getParameter('ldap_lastname');
$ldap_email = $this->container->getParameter('ldap_email'); $ldap_email = $this->container->getParameter('ldap_email');
$ldap_usersadmin = $this->container->getParameter('ldap_usersadmin'); $ldap_usersadmin = $this->container->getParameter('ldap_usersadmin');
$scribe_group = $this->container->getParameter('scribe_group');
$scribe_master = $this->container->getParameter('scribe_master');
$fieldstoread = array($ldap_username,$ldap_firstname,$ldap_lastname,$ldap_email); $fieldstoread = array($ldap_username,$ldap_firstname,$ldap_lastname,$ldap_email);
$ldapusers = array(); $ldapusers = array();
$ldapmails = array(); $ldapmails = array();
@ -119,7 +121,7 @@ class SynchroCommand extends Command
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))"; $ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
$label="PROFIL - Enseignants"; $label="PROFIL - Enseignants";
$this->writeln(" - $label"); $this->writeln(" - $label");
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true); if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
// Responsables // Responsables
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))"; $ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
@ -131,7 +133,7 @@ class SynchroCommand extends Command
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))"; $ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
$label="PROFIL - Administratifs"; $label="PROFIL - Administratifs";
$this->writeln(" - $label"); $this->writeln(" - $label");
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true); if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
// Classes // Classes
$this->writeln(''); $this->writeln('');
@ -143,7 +145,7 @@ class SynchroCommand extends Command
$label="CLASSE - ".$result["cn"]; $label="CLASSE - ".$result["cn"];
$this->writeln(" - $label"); $this->writeln(" - $label");
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true); if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
} }
// Options // Options
@ -156,7 +158,7 @@ class SynchroCommand extends Command
$label="OPTION - ".$result["cn"]; $label="OPTION - ".$result["cn"];
$this->writeln(" - $label"); $this->writeln(" - $label");
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true); if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
} }
// Groupes // Groupes
@ -169,7 +171,7 @@ class SynchroCommand extends Command
$label="GROUPE - ".$result["cn"]; $label="GROUPE - ".$result["cn"];
$this->writeln(" - $label"); $this->writeln(" - $label");
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true); if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
} }
} }
@ -243,7 +245,8 @@ class SynchroCommand extends Command
if($user->getLastname()!=$result[$ldap_lastname]||$user->getFirstname()!=$result[$ldap_firstname]||$user->getEmail()!=$result[$ldap_email]||$toadmin) { if($user->getLastname()!=$result[$ldap_lastname]||$user->getFirstname()!=$result[$ldap_firstname]||$user->getEmail()!=$result[$ldap_email]||$toadmin) {
$usermail=$this->em->getRepository('CadolesCoreBundle:User')->findOneBy(array('email' => $result[$ldap_email])); $usermail=$this->em->getRepository('CadolesCoreBundle:User')->findOneBy(array('email' => $result[$ldap_email]));
if($usermail!=$user) {
if($usermail&&$usermail!=$user) {
array_push($tberrors," - Modification dans Bundle impossible >> ".$result[$ldap_username]." un autre utilisateur a déjà ce mail = ".$result[$ldap_email]); array_push($tberrors," - Modification dans Bundle impossible >> ".$result[$ldap_username]." un autre utilisateur a déjà ce mail = ".$result[$ldap_email]);
} }
else { else {
@ -376,6 +379,62 @@ class SynchroCommand extends Command
$this->em->clear(); $this->em->clear();
if($nbusers%1000==0) $this->writelnred(" == Nombre d'utilisateurs traités = $nbusers=="); if($nbusers%1000==0) $this->writelnred(" == Nombre d'utilisateurs traités = $nbusers==");
} }
$this->writeln('');
$this->writeln('== GROUPS ============================================');
// Pour chaque groupe annuaire on s'assure que le groupe existe bien dans l'annuaire
$groups=$this->em->getRepository('CadolesCoreBundle:Group')->findBy(["fgtemplate"=>true]);
foreach($groups as $group) {
if(stripos($group->getLabel(),"PROFIL - ")===false) {
$results = $this->ldap->search($group->getLdapfilter(), [], $this->ldap_basedn);
if(count($results)==0) {
$this->writeln(" - Suppression dans Bundle >> ".$group->getLabel());
if(!$simulate) {
if($group->getFgcanshare()) {
// Sur l'ensemble des pages liés
$pages=$group->getPages();
foreach($pages as $page) {
$getgroups=$page->getGroups();
// si la page est lié qu'à un seul group on peut la supprimer
if($getgroups->count()==1)
$this->em->remove($page);
}
// Sur l'ensemble des calendar liés
$calendars=$group->getCalendars();
foreach($calendars as $calendar) {
$getgroups=$calendar->getGroups();
// si la page est lié qu'à un seul group on peut la supprimer
if($getgroups->count()==1)
$this->em->remove($calendar);
}
// Sur l'ensemble des blog liés
$blogs=$group->getBlogs();
foreach($blogs as $blog) {
$getgroups=$blog->getGroups();
// si la page est lié qu'à un seul group on peut la supprimer
if($getgroups->count()==1)
$this->em->remove($blog);
}
// Sur l'ensemble des project liés
$projects=$group->getProjects();
foreach($projects as $project) {
$getgroups=$project->getGroups();
// si la page est lié qu'à un seul group on peut la supprimer
if($getgroups->count()==1)
$this->em->remove($project);
}
}
$this->em->remove($group);
$this->em->flush();
}
}
}
}
} }
} }
else { else {
@ -700,13 +759,13 @@ class SynchroCommand extends Command
$group=$this->em->getRepository('CadolesCoreBundle:Group')->findOneBy(array('fgtemplate' => true, 'label' => $label)); $group=$this->em->getRepository('CadolesCoreBundle:Group')->findOneBy(array('fgtemplate' => true, 'label' => $label));
if(!$group) { if(!$group) {
$group=new Group(); $group=new Group();
$group->setFgcanshare($fgcanshare);
$group->setFgcancreatepage(false); $group->setFgcancreatepage(false);
$group->setFgcancreateblog(false); $group->setFgcancreateblog(false);
$group->setFgcancreatecalendar(false); $group->setFgcancreatecalendar(false);
$group->setFgcancreateproject(false); $group->setFgcancreateproject(false);
} }
$group->setFgcanshare($fgcanshare);
$group->setLabel($label); $group->setLabel($label);
$group->setFgopen(false); $group->setFgopen(false);
$group->setFgall(false); $group->setFgall(false);
@ -782,7 +841,8 @@ class SynchroCommand extends Command
// Si modèle scribe // Si modèle scribe
$ldap_template = $this->container->getParameter('ldap_template'); $ldap_template = $this->container->getParameter('ldap_template');
if($ldap_template=="scribe") { $scribe_master = $this->container->getParameter('scribe_master');
if($ldap_template=="scribe"&&$scribe_master) {
$ldapfilter="(|(&(uid=".$user->getUsername().")(ENTPersonProfils=enseignant))(&(uid=".$user->getUsername().")(typeadmin=0))(&(uid=".$user->getUsername().")(typeadmin=2)))"; $ldapfilter="(|(&(uid=".$user->getUsername().")(ENTPersonProfils=enseignant))(&(uid=".$user->getUsername().")(typeadmin=0))(&(uid=".$user->getUsername().")(typeadmin=2)))";
$results = $this->ldap->search($ldapfilter, ['uid'], $this->ldap_basedn); $results = $this->ldap->search($ldapfilter, ['uid'], $this->ldap_basedn);
if($results) $member->setFgmanager(true); if($results) $member->setFgmanager(true);

View File

@ -958,7 +958,7 @@ class GroupController extends Controller
// Sur l'ensemble des project liés // Sur l'ensemble des project liés
$projects=$data->getProjects(); $projects=$data->getProjects();
foreach($projects as $project) { foreach($projects as $project) {
$groups=$blog->getGroups(); $groups=$project->getGroups();
// si la page est lié qu'à un seul group on peut la supprimer // si la page est lié qu'à un seul group on peut la supprimer
if($groups->count()==1) if($groups->count()==1)
$em->remove($project); $em->remove($project);

View File

@ -255,7 +255,7 @@ function MyTourGroupe() {
element: $("#diviconsel"), element: $("#diviconsel"),
title: "Icône du groupe", title: "Icône du groupe",
placement : "right", placement : "right",
content: "Choisissez l'icône pour votre groupe en cliquant sur 'Sélectionner un icône'.", content: "Choisissez l'icône pour votre groupe en cliquant sur 'Sélectionner une icône'.",
}, },
{ {
element: $("#group_submit"), element: $("#group_submit"),
@ -793,7 +793,7 @@ function AdminGroupSubmit() {
element: $("#diviconsel"), element: $("#diviconsel"),
title: "Icône du groupe", title: "Icône du groupe",
placement : "top", placement : "top",
content: "Choisissez l'icône pour le groupe en cliquant sur 'Sélectionner un icône'. ", content: "Choisissez l'icône pour le groupe en cliquant sur 'Sélectionner une icône'. ",
}, },
{ {
element: $("#group_fgcancreatepage"), element: $("#group_fgcancreatepage"),
@ -1876,7 +1876,7 @@ function AdminIcon() {
steps: [ steps: [
{ {
element: $(".btn:first"), element: $(".btn:first"),
title: "Ajouter une icone", title: "Ajouter une icône",
placement : "top", placement : "top",
content: "Ajoutez une icône en cliquant sur ce bouton - les icônes sont utilisées pour l'identité des items, des widgets et des groupes. En cliquant sur une icône existante, vous pourrez la supprimer ou la modifier. Essayez de choisir des icônes en phase avec les tendances graphiques du portail... ", content: "Ajoutez une icône en cliquant sur ce bouton - les icônes sont utilisées pour l'identité des items, des widgets et des groupes. En cliquant sur une icône existante, vous pourrez la supprimer ou la modifier. Essayez de choisir des icônes en phase avec les tendances graphiques du portail... ",
}, },

View File

@ -41,7 +41,7 @@
<div style="width: 400px;margin: auto;text-align: center;margin-top: 50px;"> <div style="width: 400px;margin: auto;text-align: center;margin-top: 50px;">
<img id="logo" src="/{{ alias }}/{{ app.session.get('logo') }}"> <img id="logo" src="/{{ alias }}/{{ app.session.get('logo') }}">
<h1>{{ app.session.get('appname') }}</h1> <h1>{{ app.session.get('appname') }}</h1>
<h2>Vous avez perdu votre connection</h2> <h2>Vous avez perdu votre connexion</h2>
ou ou
<h2>Vous n'avez plus accès à cette page</h2> <h2>Vous n'avez plus accès à cette page</h2>
<br><br> <br><br>

View File

@ -121,7 +121,7 @@
<div style="text-align:center;padding:0px"> <div style="text-align:center;padding:0px">
{{ form_row(form.idicon) }} {{ form_row(form.idicon) }}
<a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner un Icône</a> <a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a> <a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div> </div>
<br> <br>
@ -219,7 +219,7 @@
} }
function selectIcon() { function selectIcon() {
$("#mymodal").find(".modal-title").html("SELECTIONNER UN ICONE"); $("#mymodal").find(".modal-title").html("SELECTIONNER UNE ICONE");
var url="{{ path('cadoles_portal_user_icon_select') }}"; var url="{{ path('cadoles_portal_user_icon_select') }}";
$("#mymodal").find("#framemodal").attr("src",url); $("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal("show"); $("#mymodal").modal("show");

View File

@ -32,7 +32,7 @@
<thead> <thead>
<tr> <tr>
<th width="160px" class="no-sort">Action</th> <th width="160px" class="no-sort">Action</th>
<th class="no-sort text-center">Icone</th> <th class="no-sort text-center">Icône</th>
<th>Label</th> <th>Label</th>
<th>Ouvert</th> <th>Ouvert</th>
<th class="no-sort {% if masteridentity=="SQL" %} no-visible {% endif %}">Filtre</th> <th class="no-sort {% if masteridentity=="SQL" %} no-visible {% endif %}">Filtre</th>

View File

@ -59,7 +59,7 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-key fa-fw"></i> Connection <i class="fa fa-key fa-fw"></i> Connexion
</div> </div>
<div class="panel-body"> <div class="panel-body">

View File

@ -66,7 +66,7 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-key fa-fw"></i> Connection <i class="fa fa-key fa-fw"></i> Connexion
</div> </div>
<div class="panel-body"> <div class="panel-body">

View File

@ -21,6 +21,7 @@ use Cadoles\PortalBundle\Entity\Appexternal;
use Cadoles\PortalBundle\Entity\Flux; use Cadoles\PortalBundle\Entity\Flux;
use Cadoles\PortalBundle\Entity\Projecttasktag; use Cadoles\PortalBundle\Entity\Projecttasktag;
use Cadoles\PortalBundle\Entity\Projecttaskstatus; use Cadoles\PortalBundle\Entity\Projecttaskstatus;
use Cadoles\PortalBundle\Entity\Alertcategory;
use Cadoles\PortalBundle\Entity\Itemcategory; use Cadoles\PortalBundle\Entity\Itemcategory;
use Cadoles\PortalBundle\Entity\Item; use Cadoles\PortalBundle\Entity\Item;
@ -95,6 +96,10 @@ class InitDataCommand extends ContainerAwareCommand
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator()); $metadata->setIdGenerator(new AssignedGenerator());
$metadata = $em->getClassMetaData('CadolesPortalBundle:Alertcategory');
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator());
$metadata = $em->getClassMetaData('CadolesPortalBundle:Itemcategory'); $metadata = $em->getClassMetaData('CadolesPortalBundle:Itemcategory');
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator()); $metadata->setIdGenerator(new AssignedGenerator());
@ -318,6 +323,21 @@ class InitDataCommand extends ContainerAwareCommand
} }
//== ALERTCATEGORY========================================================================================================================================
$output->writeln(' > Creation Alert Category');
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_megaphone2.png"]);
$entityAlertcategoryapp = $em->getRepository('CadolesPortalBundle:Alertcategory')->find(-100);
if(!$entityAlertcategoryapp) {
$entityAlertcategoryapp = new Alertcategory();
$entityAlertcategoryapp->setId(-100);
$entityAlertcategoryapp->setColor("00a996");
$entityAlertcategoryapp->setLabel('Annonces');
$entityAlertcategoryapp->setIcon($entityicon);
$em->persist($entityAlertcategoryapp);
}
//== ITEMCATEGORY======================================================================================================================================== //== ITEMCATEGORY========================================================================================================================================
$output->writeln(' > Creation Item Category'); $output->writeln(' > Creation Item Category');
@ -1221,7 +1241,7 @@ class InitDataCommand extends ContainerAwareCommand
$entityWidget->setAutoajust(true); $entityWidget->setAutoajust(true);
$entityWidget->setBorder(false); $entityWidget->setBorder(false);
$entityWidget->setOpened(true); $entityWidget->setOpened(true);
$entityWidget->setAccess(["config","user","group"]); $entityWidget->setAccess(["config","group"]);
$parameter = json_decode('{"fields": []}'); $parameter = json_decode('{"fields": []}');
$entityWidget->setParameter($parameter); $entityWidget->setParameter($parameter);
$em->persist($entityWidget); $em->persist($entityWidget);
@ -1328,7 +1348,7 @@ class InitDataCommand extends ContainerAwareCommand
$entityWidget->setOpened(true); $entityWidget->setOpened(true);
$entityWidget->setAccess(["config","user","group"]); $entityWidget->setAccess(["config","user","group"]);
$entityWidget->setColorbodyback("ffffff"); $entityWidget->setColorbodyback("ffffff");
$parameter = json_decode('{"fields": [{"id": "seetitle", "loc": "col1", "type": "boolean", "label": "Afficher le titre", "value": "0", "mandatory": "true"},{"id": "seeicon", "loc": "col1", "type": "boolean", "label": "Afficher l\'icone", "value": "0", "mandatory": "true"}]}'); $parameter = json_decode('{"fields": [{"id": "seetitle", "loc": "col1", "type": "boolean", "label": "Afficher le titre", "value": "0", "mandatory": "true"},{"id": "seeicon", "loc": "col1", "type": "boolean", "label": "Afficher l\'icône", "value": "0", "mandatory": "true"}]}');
$entityWidget->setParameter($parameter); $entityWidget->setParameter($parameter);
$em->persist($entityWidget); $em->persist($entityWidget);

View File

@ -112,8 +112,9 @@ class BlogController extends Controller
foreach($datas as $data) { foreach($datas as $data) {
$route=str_replace("_config_","_".$access."_",$this->routeprimary); $route=str_replace("_config_","_".$access."_",$this->routeprimary);
$action = ""; $action = "";
$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-gear fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-2x'></i></a>";
$user=""; $user="";
if($data->getUser()) { if($data->getUser()) {

View File

@ -109,8 +109,9 @@ class CalendarController extends Controller
foreach($datas as $data) { foreach($datas as $data) {
$route=str_replace("_config_","_".$access."_",$this->routeprimary); $route=str_replace("_config_","_".$access."_",$this->routeprimary);
$action = ""; $action = "";
$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-gear fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-2x'></i></a>";
$user=""; $user="";
if($data->getUser()) { if($data->getUser()) {

View File

@ -123,8 +123,9 @@ class PageController extends Controller
$route=str_replace("_config_","_".$access."_",$this->routeprimary); $route=str_replace("_config_","_".$access."_",$this->routeprimary);
$action = ""; $action = "";
//$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>"; //$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-gear fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-2x'></i></a>";
$user=""; $user="";
if($data->getUser()) { if($data->getUser()) {

View File

@ -102,9 +102,9 @@ class PagetemplateController extends Controller
$route=str_replace("_config_","_".$access."_",$this->routeprimary); $route=str_replace("_config_","_".$access."_",$this->routeprimary);
$action = ""; $action = "";
//$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>"; $action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-gear fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-2x'></i></a>";
array_push($output["data"],[ array_push($output["data"],[
$action, $action,

View File

@ -1603,7 +1603,7 @@ class PagewidgetController 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.');
$groupentity=$em->getRepository("CadolesCoreBundle:Group")->find($group); if($group) $groupentity=$em->getRepository("CadolesCoreBundle:Group")->find($group);
// Permissions // Permissions
if($access=="config") { if($access=="config") {

View File

@ -112,8 +112,10 @@ class ProjectController extends Controller
foreach($datas as $data) { foreach($datas as $data) {
$route=str_replace("_config_","_".$access."_",$this->routeprimary); $route=str_replace("_config_","_".$access."_",$this->routeprimary);
$action = ""; $action = "";
$action.="<a href='".$this->generateUrl($route.'_update', array('id'=>$data->getId()))."'><i class='fa fa-gear fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>"; $action.="<a href='".$this->generateUrl($route.'_delete', array('id'=>$data->getId()))."' data-method='delete'><i class='fa fa-trash fa-fw fa-2x'></i></a>";
$action.="<a href='".$this->generateUrl($route.'_view', array('id'=>$data->getId()))."'><i class='fa fa-eye fa-2x'></i></a>";
$user=""; $user="";
if($data->getUser()) { if($data->getUser()) {

View File

@ -50,6 +50,13 @@ class Alertcategory
*/ */
protected $alerts; protected $alerts;
// A garder pour forcer l'id en init
public function setId($id)
{
$this->id = $id;
return $this;
}
/** /**
* Constructor * Constructor

View File

@ -11,7 +11,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\Entity * @ORM\Entity
* @ORM\Table(name="icon") * @ORM\Table(name="icon")
* @ORM\HasLifecycleCallbacks * @ORM\HasLifecycleCallbacks
* @UniqueEntity(fields="label", message="Un Icone existe déjà avec ce label") * @UniqueEntity(fields="label", message="Une Icône existe déjà avec ce label")
*/ */
class Icon class Icon
{ {

View File

@ -57,7 +57,7 @@
<div class="col-md-12" style="text-align:center;padding:0px"> <div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }} {{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner un Icône</a> <a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a> <a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div> </div>
</div> </div>
@ -68,7 +68,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UN ICONE</h4> <h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View File

@ -24,7 +24,7 @@
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%"> <table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead> <thead>
<tr> <tr>
<th width="100px" class="no-sort">Action</th> <th width="120px" class="no-sort">Action</th>
<th>Nom</th> <th>Nom</th>
<th>Propriétaire</th> <th>Propriétaire</th>
</tr> </tr>

View File

@ -6,7 +6,7 @@
{% if access=="config" %} {% if access=="config" %}
<div class="pagemenu"> <div class="pagemenu">
<a href="{{ path('cadoles_portal_config_blog_view', {id:entity.id})}}">{{ entity.name }}</a> <a href="{{ path('cadoles_portal_config_blog_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_blog_update', {id:entity.id}) }}' title='Modifier'><i class='fa fa-file fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_blog_update', {id:entity.id}) }}' title='Modifier'><i class='fa fa-gear fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_blog_writer', {id:entity.id}) }}' title='Permission'><i class='fa fa-users fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_blog_writer', {id:entity.id}) }}' title='Permission'><i class='fa fa-users 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> <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>

View File

@ -69,7 +69,7 @@
<div class="col-md-12" style="text-align:center;padding:0px"> <div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }} {{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner un Icône</a> <a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a> <a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div> </div>
</div> </div>
@ -80,7 +80,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UN ICONE</h4> <h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View File

@ -25,7 +25,7 @@
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%"> <table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead> <thead>
<tr> <tr>
<th width="100px" class="no-sort">Action</th> <th width="120px" class="no-sort">Action</th>
<th>Nom</th> <th>Nom</th>
<th>Propriétaire</th> <th>Propriétaire</th>
</tr> </tr>

View File

@ -6,7 +6,7 @@
{% if access=="config" %} {% if access=="config" %}
<div class="pagemenu"> <div class="pagemenu">
<a href="{{ path('cadoles_portal_config_calendar_view', {id:entity.id})}}">{{ entity.name }}</a> <a href="{{ path('cadoles_portal_config_calendar_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_calendar_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-file fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_calendar_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-gear 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> <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 %}

View File

@ -71,7 +71,7 @@
<div class="col-md-12" style="text-align:center;padding:0px"> <div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }} {{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner un Icône</a> <a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a> <a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div> </div>
</div> </div>
@ -82,7 +82,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UN ICONE</h4> <h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View File

@ -25,7 +25,7 @@
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%"> <table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead> <thead>
<tr> <tr>
<th width="100px" class="no-sort">Action</th> <th width="120px" class="no-sort">Action</th>
<th>Ordre</th> <th>Ordre</th>
<th>Nom</th> <th>Nom</th>
<th class="no-sort">Catégorie</th> <th class="no-sort">Catégorie</th>

View File

@ -6,7 +6,7 @@
<div class="pagemenu"> <div class="pagemenu">
<a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a> <a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-file fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-gear fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_page_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_page_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>
{% endif %} {% endif %}

View File

@ -16,7 +16,7 @@
<div class="pagemenu"> <div class="pagemenu">
<a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a> <a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-file fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-gear fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_page_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_page_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>
{% endif %} {% endif %}

View File

@ -11,7 +11,7 @@
<a href="{{ path('cadoles_portal_config_page'~template~'_view', {id:entity.id})}}">{{ entity.name }}</a> <a href="{{ path('cadoles_portal_config_page'~template~'_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_page'~template~'_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-file fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_page'~template~'_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-gear fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_page'~template~'_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_page'~template~'_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='' style='cursor:pointer' data-toggle='modal' data-target='#selwidget' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a> <a href='' style='cursor:pointer' data-toggle='modal' data-target='#selwidget' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a>
</div> </div>
@ -25,7 +25,7 @@
<div id="tolocalize" style="display:none"> <div id="tolocalize" style="display:none">
{% for pagewidget in entity.pagewidgets %} {% for pagewidget in entity.pagewidgets %}
<!-- {{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group}) }} --> <a href="{{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group}) }}"></a>
{{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group})) }} {{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group})) }}
{% endfor %} {% endfor %}
</div> </div>

View File

@ -29,7 +29,7 @@
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%"> <table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead> <thead>
<tr> <tr>
<th width="100px" class="no-sort">Action</th> <th width="120px" class="no-sort">Action</th>
<th>Ordre</th> <th>Ordre</th>
<th>Nom</th> <th>Nom</th>
<th>Pour</th> <th>Pour</th>

View File

@ -61,7 +61,7 @@
</div> </div>
<div class="col-md-12" style="text-align:center;padding:0px"> <div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }} {{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner un Icône</a> <a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
</div> </div>
</div> </div>
</div> </div>
@ -93,7 +93,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UN ICONE</h4> <h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div> </div>
<div class="modal-body" style="height: 480px; overflow-y: scroll;"> <div class="modal-body" style="height: 480px; overflow-y: scroll;">

View File

@ -24,7 +24,7 @@
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%"> <table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead> <thead>
<tr> <tr>
<th width="100px" class="no-sort">Action</th> <th width="120px" class="no-sort">Action</th>
<th>Nom</th> <th>Nom</th>
<th>Propriétaire</th> <th>Propriétaire</th>
</tr> </tr>

View File

@ -7,7 +7,7 @@
{% if access=="config" %} {% if access=="config" %}
<div class="pagemenu"> <div class="pagemenu">
<a href="{{ path('cadoles_portal_config_project_view', {id:entity.id})}}">{{ entity.name }}</a> <a href="{{ path('cadoles_portal_config_project_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_project_update', {id:entity.id}) }}' title='Modifier'><i class='fa fa-file fa-fw'></i></a> <a href='{{ path('cadoles_portal_config_project_update', {id:entity.id}) }}' title='Modifier'><i class='fa fa-gear 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_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>

View File

@ -97,7 +97,7 @@ INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type
('006', 0, 1, 0, 'datauser', 'datauser', '', '', 'Parametrage des champs utilisateurs : obligatoire / facultatif / caché'), ('006', 0, 1, 0, 'datauser', 'datauser', '', '', 'Parametrage des champs utilisateurs : obligatoire / facultatif / caché'),
('007', 0, 1, 0, 'datausers', 'datausers', '', '', 'Parametrage des colonnes visible dans la liste des utilisateurs'), ('007', 0, 1, 0, 'datausers', 'datausers', '', '', 'Parametrage des colonnes visible dans la liste des utilisateurs'),
('010', 1, 1, 1, 'boolean', 'fgforceconnect', '0', '', 'Forcer la connection afin de rendre votre site privé'), ('010', 1, 1, 1, 'boolean', 'fgforceconnect', '0', '', 'Forcer la connexion afin de rendre votre site privé'),
('040', 1, 1, 1, 'boolean', 'fgheader', '1', '', 'Utiliser une image en bannière du site'), ('040', 1, 1, 1, 'boolean', 'fgheader', '1', '', 'Utiliser une image en bannière du site'),
('041', 1, 1, 1, 'header', 'header', 'uploads/header/header.png', 'fgheader', 'Image en bannière du site'), ('041', 1, 1, 1, 'header', 'header', 'uploads/header/header.png', 'fgheader', 'Image en bannière du site'),

View File

@ -184,6 +184,20 @@ parameters:
ldap_email: mail ldap_email: mail
ldap_usersadmin: [admin] ldap_usersadmin: [admin]
# Template scribe
%if %%getVar("ninegate_scribegroup", 'non') == "oui"
scribe_group: true
%else
scribe_group: false
%end if
%if %%getVar("ninegate_scribemaster", 'non') == "oui"
scribe_master: true
%else
scribe_master: false
%end if
# Activation Widget # Activation Widget
%if %%getVar("ninegate_activate_widadminer", 'non') == "oui" %if %%getVar("ninegate_activate_widadminer", 'non') == "oui"
activate_widadminer: true activate_widadminer: true