diff --git a/dicos/30_ninegate.xml b/dicos/90_ninegate.xml
similarity index 63%
rename from dicos/30_ninegate.xml
rename to dicos/90_ninegate.xml
index 7d364fda..d7fcd47e 100644
--- a/dicos/30_ninegate.xml
+++ b/dicos/90_ninegate.xml
@@ -21,14 +21,26 @@
non
+
+ non
+
+
+ non
+
+
+ non
+
+
+
+
oui
- SQL
- SQL
+ LDAP
+ CAS
- oui
- oui
+ non
+ non
scribe
@@ -53,6 +65,25 @@
none
8
+
+ oui
+
+
+ oui
+
+
+
+ non
+
+
+
+
+
+ non
+
+
+
+
@@ -73,6 +104,8 @@
Paramètres associés à l'Annuaire
Paramètres associés aux look de l'application
+ Paramètres associés aux modules à activer
+ Paramètres associés au Portail
Paramètres associés aux Mails
Paramètres associés à la Base de Données
@@ -119,6 +152,9 @@
ninegate_moderegistration
ninegate_keyterm
+ ninegate_activate_portal
+ ninegate_activate_item
+
ninegate_noreply
ninegate_smtphost
ninegate_smtpport
@@ -150,17 +186,40 @@
SSO
ninegate_ldaptemplate
+ ninegate_test_conf_cadolesldap
non
ninegate_pwdadmin
+ ninegate_niveau01name
+ ninegate_niveau01siren
+
+
+
+ CadolesLDAP
+ ninegate_ldaptemplate
+ oui
+ non
+ non
+
+
+
+ oui
+ OR
+ ninegate_syncldap
+ ninegate_test_conf_cadolesldap
+ oui
+ non
+
+
+
+ non
+
ninegate_organization
ninegate_niveau01branche
ninegate_niveau02branche
- ninegate_niveau01name
- ninegate_niveau01siren
@@ -172,32 +231,100 @@
-
- ['LDAP', 'SQL', 'SSO']
-
-
- ['CAS', 'SAML', 'SQL', 'LDAP']
-
-
- ['none', 'byuser', 'byadmin']
-
+
+
+ non
-
- ['scribe', 'open']
-
+ ninegate_activate_widmoodle
+ ninegate_activate_widlimesurvey
+
-
- ['tls', 'ssl', 'null']
-
-
- ['plain', 'login', 'cram-md5', 'null']
-
+
+ oui
-
- ['default', 'externe', 'local']
-
+ ninegate_activate_item
+
+
+
+
+
+
+
+ oui
+ activer_moodle
+ oui
+ non
+ non
+
+
+
+ non
+
+ ninegate_widmoodle_url
+ ninegate_widmoodle_apikey
+
+
+
+ oui
+ activer_moodle
+ /moodle
+ None
+
+
+
+ oui
+ activer_moodle
+ moodle_apikey
+ None
+
+
+
+
+
+
+
+ oui
+ activer_limesurvey
+ oui
+ non
+ non
+
+
+
+ non
+
+ ninegate_widlimesurvey_url
+ ninegate_widlimesurvey_apiuser
+ ninegate_widlimesurvey_apikey
+
+
+
+ oui
+ activer_limesurvey
+ /limesurvey
+ None
+
+
+
+ oui
+ activer_limesurvey
+ restuser
+ None
+
+
+
+ oui
+ activer_limesurvey
+ apikeyenvole
+ None
+
+
+
+
+
+
local
ninegate_dbserver
@@ -213,6 +340,38 @@
ninegate_dbpass
ninegate_allow_hosts
+
+
+
+
+
+ ['LDAP', 'SQL', 'SSO']
+
+
+
+ ['CAS', 'SAML', 'SQL', 'LDAP']
+
+
+
+ ['none', 'byuser', 'byadmin']
+
+
+
+ ['scribe', 'open', 'CadolesLDAP']
+
+
+
+ ['tls', 'ssl', 'null']
+
+
+ ['plain', 'login', 'cram-md5', 'null']
+
+
+
+ ['default', 'externe', 'local']
+
+
+
diff --git a/src/ninegate-1.0/app/config/twig.yml b/src/ninegate-1.0/app/config/twig.yml
index defc52de..468e53ee 100644
--- a/src/ninegate-1.0/app/config/twig.yml
+++ b/src/ninegate-1.0/app/config/twig.yml
@@ -8,6 +8,7 @@ twig:
cron_activate: %cron_activate%
portal_activate: %portal_activate%
+ portal_item_activate: %portal_item_activate%
eportail_sync: %eportail_sync%
moderegistration: %moderegistration%
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
index 5ef639d3..ecc277eb 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
@@ -5,10 +5,10 @@ SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
-(-100, 'ldapbundle', '0000000A');
+(-100, 'transnum', '0000000A');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
-(-100, -100, 'admin', 'Administrateur', 'ldapbundle', 'PWD_CAS', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '0000000A', 'simple');
+(-100, -100, 'admin', 'Administrateur', 'transnum', 'PWD_CAS', 'admin@transnum.cadol.es', 'admin.jpg', 'ROLE_ADMIN', '0000000A', 'simple');
@@ -20,6 +20,7 @@ INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `f
(1200, NULL, 1200, 'ORGANISATION', NULL, 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO', ''),
(1210, 1200, 1210, 'Listes Blanche', 'cadoles_core_config_whitelist', 'fa-tasks', 'ROLE_ADMIN', ''),
(1220, 1200, 1220, 'Niveau 01', 'cadoles_core_config_niveau01', 'fa-building', 'ROLE_ADMIN', ''),
+(1230, 1200, 1230, 'Niveau 02', 'cadoles_core_config_niveau02', 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO', ''),
(1240, 1200, 1240, 'Groupes', 'cadoles_core_config_group', 'fa-users', 'ROLE_ADMIN,ROLE_MODO', ''),
(1250, 1200, 1250, 'Inscriptions', 'cadoles_core_config_registration', 'fa-pencil-square-o', 'ROLE_ADMIN,ROLE_MODO', ''),
(1260, 1200, 1260, 'Utilisateurs', 'cadoles_core_config_user', 'fa-child', 'ROLE_ADMIN,ROLE_MODO', ''),
@@ -34,6 +35,15 @@ INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `f
(1570, 1500, 1570, 'Chartes', 'cadoles_portal_config_notice', 'fa-info', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1580, 1500, 1580, 'Icônes', 'cadoles_portal_config_icon', 'fa-bug', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
+(2500, NULL, 2500, 'MODULES', NULL, 'fa-cubes', 'ROLE_ADMIN,ROLE_MODO', 'module_activate'),
+(2510, 2500, 2510, 'Pages', 'cadoles_portal_config_page', 'fa-file', 'ROLE_ADMIN,ROLE_MODO', 'page_activate'),
+(2520, 2500, 2520, 'Items', 'cadoles_portal_config_item', 'fa-desktop', 'ROLE_ADMIN,ROLE_MODO', 'item_activate'),
+(2530, 2500, 2530, 'Annonces', 'cadoles_portal_config_alert', 'fa-bell', 'ROLE_ADMIN,ROLE_MODO', 'alert_activate'),
+(2540, 2500, 2540, 'Calendriers', 'cadoles_portal_config_calendar', 'fa-calendar', 'ROLE_ADMIN,ROLE_MODO', 'calendar_activate'),
+(2550, 2500, 2550, 'Blogs', 'cadoles_portal_config_blog', 'fa-paper-plane', 'ROLE_ADMIN,ROLE_MODO', 'blog_activate'),
+(2560, 2500, 2560, 'Flux', 'cadoles_portal_config_flux', 'fa-rss', 'ROLE_ADMIN,ROLE_MODO', 'flux_activate'),
+(2570, 2500, 2570, 'Chartes', 'cadoles_portal_config_notice', 'fa-info', 'ROLE_ADMIN,ROLE_MODO', 'notice_activate'),
+(2580, 2500, 2580, 'Icônes', 'cadoles_portal_config_icon', 'fa-bug', 'ROLE_ADMIN,ROLE_MODO', 'module_activate'),
(7000, NULL, 7000, 'CRON', NULL, 'fa-bolt', 'ROLE_ADMIN', 'cron_activate'),
(7010, 7000, 7010, 'Jobs', 'cadoles_cron_config', 'fa-bullseye', 'ROLE_ADMIN', 'cron_activate'),
@@ -61,6 +71,6 @@ INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type
('060', 1, 1, 1, 'font', 'fontfacetitle', 'Anton-Regular', '', 'Police des titres de votre site'),
('061', 1, 1, 1, 'font', 'fontfacebody', 'Helvetica', '', 'Police des titres de votre site'),
-('200', 1, 0, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'),
-('201', 1, 0, 1, 'string', 'PROXYserver', '192.168.57.160', 'PROXYactivate','Adresse du Proxy'),
-('202', 1, 0, 1, 'string', 'PROXYport', '8080', 'PROXYactivate','Port du Proxy');
+('200', 1, 0, 1, 'boolean', 'PROXYactivate', '0', '', 'Définit un Proxy'),
+('201', 1, 0, 1, 'string', 'PROXYserver', '', 'PROXYactivate','Adresse du Proxy'),
+('202', 1, 0, 1, 'string', 'PROXYport', '', 'PROXYactivate','Port du Proxy');
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/AjaxController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/AjaxController.php
index a0c2c7e5..8d71d856 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/AjaxController.php
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/AjaxController.php
@@ -70,6 +70,34 @@ class AjaxController extends Controller
}
+ public function niveau01listAction(Request $request)
+ {
+ // S'assurer que c'est un appel ajax
+ if (!$request->isXmlHttpRequest()) {
+ return new JsonResponse(array('message' => 'Interdit'), 400);
+ }
+
+ $output=array();
+ $em = $this->getDoctrine()->getManager();
+ $page_limit=$request->query->get('page_limit');
+ $q=$request->query->get('q');
+
+ $qb = $em->createQueryBuilder();
+ $qb->select('table')->from("CadolesCoreBundle:Niveau01",'table')
+ ->where('table.label LIKE :value')
+ ->setParameter("value", "%".$q."%")
+ ->orderBy('table.label');
+
+ $datas=$qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult();
+ foreach($datas as $data) {
+ array_push($output,array("id"=>$data->getId(),"text"=>$data->getLabel()));
+ }
+
+ $response = new Response(json_encode($output));
+ $response->headers->set('Content-Type', 'application/json');
+ return $response;
+ }
+
public function niveau02listAction(Request $request)
{
// S'assurer que c'est un appel ajax
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php
index 9f49594c..b182ff64 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php
@@ -76,7 +76,11 @@ class Niveau01
*/
private $modos;
-
+ /**
+ * @ORM\ManyToMany(targetEntity="Cadoles\PortalBundle\Entity\Item", mappedBy="groups")
+ */
+ protected $items;
+
/**
* Constructor
*/
@@ -86,6 +90,7 @@ class Niveau01
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
$this->modos = new \Doctrine\Common\Collections\ArrayCollection();
+ $this->items = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
@@ -329,4 +334,38 @@ class Niveau01
{
return $this->modos;
}
+
+ /**
+ * Add item
+ *
+ * @param \Cadoles\PortalBundle\Entity\Item $item
+ *
+ * @return Niveau01
+ */
+ public function addItem(\Cadoles\PortalBundle\Entity\Item $item)
+ {
+ $this->items[] = $item;
+
+ return $this;
+ }
+
+ /**
+ * Remove item
+ *
+ * @param \Cadoles\PortalBundle\Entity\Item $item
+ */
+ public function removeItem(\Cadoles\PortalBundle\Entity\Item $item)
+ {
+ $this->items->removeElement($item);
+ }
+
+ /**
+ * Get items
+ *
+ * @return \Doctrine\Common\Collections\Collection
+ */
+ public function getItems()
+ {
+ return $this->items;
+ }
}
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml
index 51f0b826..5379067d 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml
@@ -99,6 +99,10 @@ cadoles_core_ajax_city_list:
path: /ajax/city/list
defaults: { _controller: CadolesCoreBundle:Ajax:citylist }
+cadoles_core_ajax_niveau01_list:
+ path: /ajax/niveau01/list
+ defaults: { _controller: CadolesCoreBundle:Ajax:niveau01list }
+
cadoles_core_ajax_niveau02_list:
path: /ajax/niveau02/list
defaults: { _controller: CadolesCoreBundle:Ajax:niveau02list }
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/AlertcategoryController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/AlertcategoryController.php
index d50e7180..5669c113 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/AlertcategoryController.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/AlertcategoryController.php
@@ -37,7 +37,11 @@ class AlertcategoryController extends Controller
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
$em = $this->getDoctrine()->getManager();
-
+
+ $idicon = $form->get('idicon')->getData();
+ $icon=$this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findoneby(["id"=>$idicon]);
+ $data->setIcon($icon);
+
// Sauvegarde
$em->persist($data);
$em->flush();
@@ -53,6 +57,7 @@ class AlertcategoryController extends Controller
'usesidebar' => true,
$this->labeldata => $data,
'mode' => 'submit',
+ 'icons' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findAll(),
'form' => $form->createView()
]);
}
@@ -65,7 +70,10 @@ class AlertcategoryController extends Controller
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
- $form = $this->createForm(AlertcategoryType::class,$data,array("mode"=>"update"));
+ $form = $this->createForm(AlertcategoryType::class,$data,array(
+ "mode" =>"update",
+ "idicon" => ($data->getIcon()?$data->getIcon()->getId():null),
+ ));
// Récupération des data du formulaire
$form->handleRequest($request);
@@ -77,7 +85,11 @@ class AlertcategoryController extends Controller
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
-
+
+ $idicon = $form->get('idicon')->getData();
+ $icon=$this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findoneby(["id"=>$idicon]);
+ $data->setIcon($icon);
+
// Sauvegarde
$em->persist($data);
$em->flush();
@@ -94,6 +106,7 @@ class AlertcategoryController extends Controller
'usesidebar' => true,
$this->labeldata => $data,
'mode' => 'update',
+ 'icons' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findAll(),
'form' => $form->createView()
]);
}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ItemController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ItemController.php
index 2084de95..86beaac2 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ItemController.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ItemController.php
@@ -39,7 +39,7 @@ class ItemController extends Controller
$data = new Item();
// Création du formulaire
- $form = $this->createForm(ItemType::class,$data,array("mode"=>"submit"));
+ $form = $this->createForm(ItemType::class,$data,array("mode"=>"submit","labelniveau01" => $this->GetParameter("labelsniveau01"),));
// Récupération des data du formulaire
$form->handleRequest($request);
@@ -85,8 +85,9 @@ class ItemController extends Controller
// Création du formulaire
$form = $this->createForm(ItemType::class,$data,array(
- "mode" => "update",
- "idicon" => ($data->getIcon()?$data->getIcon()->getId():null),
+ "mode" => "update",
+ "idicon" => ($data->getIcon()?$data->getIcon()->getId():null),
+ "labelniveau01" => $this->GetParameter("labelsniveau01"),
));
// Récupération des data du formulaire
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php
index fa2fdbdd..e00cac07 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php
@@ -388,6 +388,7 @@ class PagewidgetController extends Controller
$user=$this->getUser();
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
$groups=($user?$user->getGroups():[]);
+ $niveau01=($user?$user->getNiveau01():[]);
// Bookmark de l'utilisateur
$bookmarks = array();
@@ -438,6 +439,24 @@ class PagewidgetController extends Controller
}
}
+ // Récupération des items par niveau01
+ if($niveau01) {
+ $qb = $em->createQueryBuilder();
+ $qb->select('item')
+ ->from("CadolesPortalBundle:Item", 'item')
+ ->where(":niveau01 MEMBER OF item.niveau01s")
+ ->setParameter("niveau01",$niveau01);
+
+ if($iditemcategory && $itemcategoryfilter) {
+ $qb->andWhere("item.itemcategory=:itemcategory")
+ ->setParameter("itemcategory",$itemcategoryfilter);
+ }
+ $itemsniveau01s=$qb->getQuery()->getResult();
+ foreach($itemsniveau01s as $itemniveau01) {
+ if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
+ }
+ }
+
// Trie des items
$itemsordered = $items->getIterator();
$itemsordered->uasort(function ($first, $second) {
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alertcategory.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alertcategory.php
index f60c08d6..3999c47c 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alertcategory.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alertcategory.php
@@ -31,13 +31,6 @@ class Alertcategory
*/
private $label;
- /**
- * @var string
- *
- * @ORM\Column(name="icon", type="text")
- */
- private $icon;
-
/**
* @var integer
*
@@ -45,12 +38,19 @@ class Alertcategory
*/
private $color;
+ /**
+ * @ORM\ManyToOne(targetEntity="Icon", inversedBy="alertcategorys")
+ * @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
+ */
+ private $icon;
+
/**
* @ORM\OneToMany(targetEntity="Alert", mappedBy="alertcategory", cascade={"persist"}, orphanRemoval=true)
* @ORM\JoinColumn(name="alerts", referencedColumnName="id")
*/
protected $alerts;
+
/**
* Constructor
*/
@@ -93,30 +93,6 @@ class Alertcategory
return $this->label;
}
- /**
- * Set icon
- *
- * @param string $icon
- *
- * @return Alertcategory
- */
- public function setIcon($icon)
- {
- $this->icon = $icon;
-
- return $this;
- }
-
- /**
- * Get icon
- *
- * @return string
- */
- public function getIcon()
- {
- return $this->icon;
- }
-
/**
* Set color
*
@@ -141,6 +117,30 @@ class Alertcategory
return $this->color;
}
+ /**
+ * Set icon
+ *
+ * @param \Cadoles\PortalBundle\Entity\Icon $icon
+ *
+ * @return Alertcategory
+ */
+ public function setIcon(\Cadoles\PortalBundle\Entity\Icon $icon = null)
+ {
+ $this->icon = $icon;
+
+ return $this;
+ }
+
+ /**
+ * Get icon
+ *
+ * @return \Cadoles\PortalBundle\Entity\Icon
+ */
+ public function getIcon()
+ {
+ return $this->icon;
+ }
+
/**
* Add alert
*
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Icon.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Icon.php
index 0d8a4cb5..26fe182f 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Icon.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Icon.php
@@ -41,6 +41,14 @@ class Icon
*/
private $items;
+ /**
+ * @var ArrayCollection $alertcategorys
+ * @var Alertcategory
+ *
+ * @ORM\OneToMany(targetEntity="Alertcategory", mappedBy="icon", cascade={"persist"}, orphanRemoval=false)
+ */
+ private $alertcategorys;
+
/**
* @var ArrayCollection $pagewidgets
* @var Pagewidget
@@ -67,13 +75,13 @@ class Icon
private $bookmarks;
-
/**
* Constructor
*/
public function __construct()
{
$this->items = new \Doctrine\Common\Collections\ArrayCollection();
+ $this->alertcategorys = new \Doctrine\Common\Collections\ArrayCollection();
$this->pagewidgets = new \Doctrine\Common\Collections\ArrayCollection();
$this->widgets = new \Doctrine\Common\Collections\ArrayCollection();
$this->bookmarks = new \Doctrine\Common\Collections\ArrayCollection();
@@ -171,6 +179,40 @@ class Icon
return $this->items;
}
+ /**
+ * Add alertcategory
+ *
+ * @param \Cadoles\PortalBundle\Entity\Alertcategory $alertcategory
+ *
+ * @return Icon
+ */
+ public function addAlertcategory(\Cadoles\PortalBundle\Entity\Alertcategory $alertcategory)
+ {
+ $this->alertcategorys[] = $alertcategory;
+
+ return $this;
+ }
+
+ /**
+ * Remove alertcategory
+ *
+ * @param \Cadoles\PortalBundle\Entity\Alertcategory $alertcategory
+ */
+ public function removeAlertcategory(\Cadoles\PortalBundle\Entity\Alertcategory $alertcategory)
+ {
+ $this->alertcategorys->removeElement($alertcategory);
+ }
+
+ /**
+ * Get alertcategorys
+ *
+ * @return \Doctrine\Common\Collections\Collection
+ */
+ public function getAlertcategorys()
+ {
+ return $this->alertcategorys;
+ }
+
/**
* Add pagewidget
*
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php
index 10aeae5b..d73aadab 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php
@@ -123,7 +123,14 @@ class Item
*/
protected $groups;
-
+ /**
+ * @ORM\ManyToMany(targetEntity="Cadoles\CoreBundle\Entity\Niveau01", inversedBy="items", cascade={"persist"})
+ * @ORM\JoinTable(name="itemniveau01",
+ * joinColumns={@ORM\JoinColumn(name="item", referencedColumnName="id")},
+ * inverseJoinColumns={@ORM\JoinColumn(name="niveau01", referencedColumnName="id")}
+ * )
+ */
+ protected $niveau01s;
/**
@@ -133,6 +140,7 @@ class Item
{
$this->bookmarks = new \Doctrine\Common\Collections\ArrayCollection();
$this->groups = new \Doctrine\Common\Collections\ArrayCollection();
+ $this->niveau01s = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
@@ -500,4 +508,38 @@ class Item
{
return $this->groups;
}
+
+ /**
+ * Add niveau01
+ *
+ * @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
+ *
+ * @return Item
+ */
+ public function addNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
+ {
+ $this->niveau01s[] = $niveau01;
+
+ return $this;
+ }
+
+ /**
+ * Remove niveau01
+ *
+ * @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
+ */
+ public function removeNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
+ {
+ $this->niveau01s->removeElement($niveau01);
+ }
+
+ /**
+ * Get niveau01s
+ *
+ * @return \Doctrine\Common\Collections\Collection
+ */
+ public function getNiveau01s()
+ {
+ return $this->niveau01s;
+ }
}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertcategoryType.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertcategoryType.php
index 4046127f..67d4225c 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertcategoryType.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertcategoryType.php
@@ -37,11 +37,7 @@ class AlertcategoryType extends AbstractType
)
);
- $builder->add('icon',
- IconChoiceType::class, array(
- "label" => 'Icône'
- )
- );
+ $builder->add('idicon', HiddenType::class,['mapped'=> false,'data' => $options["idicon"]]);
$builder->add('color', TextType::class, [
'label' => "Couleur",
@@ -54,7 +50,8 @@ class AlertcategoryType extends AbstractType
{
$resolver->setDefaults(array(
'data_class' => 'Cadoles\PortalBundle\Entity\Alertcategory',
- 'mode' => "string"
+ 'mode' => "string",
+ 'idicon' => "string",
));
}
}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php
index 2c988c31..f80dab17 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php
@@ -68,6 +68,24 @@ class ItemType extends AbstractType
"disabled" => ($options["mode"]=="delete"?true:false),
])
+ ->add('niveau01s', Select2EntityType::class, [
+ 'label' => 'Visible pour les '.$options["labelniveau01"],
+ 'class' => 'CadolesCoreBundle:Niveau01',
+ 'text_property' => 'label',
+ 'multiple' => true,
+ 'remote_route' => 'cadoles_core_ajax_niveau01_list',
+ 'primary_key' => 'id',
+ 'text_property' => 'label',
+ 'minimum_input_length' => 0,
+ 'page_limit' => 100,
+ 'allow_clear' => true,
+ 'delay' => 250,
+ 'cache' => false,
+ 'cache_timeout' => 60000,
+ 'language' => 'fr',
+ 'placeholder' => 'Selectionner des '.$options["labelniveau01"],
+ ])
+
->add('groups', Select2EntityType::class, [
'label' => 'Visible pour les Groupes',
'class' => 'CadolesCoreBundle:Group',
@@ -83,7 +101,7 @@ class ItemType extends AbstractType
'cache' => false,
'cache_timeout' => 60000,
'language' => 'fr',
- 'placeholder' => 'Selectionner un groupe',
+ 'placeholder' => 'Selectionner des groupes',
])
->add('color', TextType::class, [
@@ -117,6 +135,7 @@ class ItemType extends AbstractType
'data_class' => 'Cadoles\PortalBundle\Entity\Item',
'mode' => "string",
'idicon' => "string",
+ 'labelniveau01' => "string",
]);
}
}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig
index b073667b..f368f2a8 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig
@@ -27,11 +27,15 @@
"
data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-id="{{ alert.id }}"
- style="background: {{ "#"~alert.alertcategory.color }};"
+ style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~color['main'] }};"
>
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alertcategory/edit.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alertcategory/edit.html.twig
index daf8c89a..22d7266b 100755
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alertcategory/edit.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alertcategory/edit.html.twig
@@ -47,29 +47,64 @@
{{ form_row(form.label) }}
- {{ form_row(form.icon) }}
{{ form_row(form.color) }}
+
+
+ {% if alertcategory.icon %}
+
+ {% endif %}
+
+
+
+
{{ form_end(form) }}
{% endblock %}
{% block localjavascript %}
- function iformat(icon) {
- var originalOption = icon.element;
- return $(' ' + icon.text + '');
+ function selIcon(idicon) {
+ $("#alertcategory_idicon").val(idicon);
+ $("#diviconsel img").remove();
+
+ $("#icon-"+idicon).clone().appendTo($("#diviconsel"));
+ $("#diviconsel img").attr("height","100px");
+ $('#selicon').modal('hide');
}
- $('.select2-icon').select2({
- width: "100%",
- formatSelection: iformat,
- templateResult: iformat,
- formatResult: iformat,
- allowHtml: true,
- escapeMarkup: function(m) {
- return m;
- }
- });
+ function delIcon() {
+ $("#diviconsel img").remove();
+ $("#item_idicon").val(null);
+ }
{% endblock %}
+
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig
index 7fdc168f..7b9f889a 100755
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig
@@ -56,10 +56,11 @@
{{ form_row(form.target) }}
{{ form_row(form.itemcategory) }}
{{ form_row(form.roles) }}
+ {{ form_row(form.niveau01s) }}
{{ form_row(form.groups) }}
{{ form_row(form.color) }}
-
+
{% if item.icon %}
{% endif %}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/list.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/list.html.twig
index 85944a45..90ec24db 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/list.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/list.html.twig
@@ -27,8 +27,8 @@
{% for item in itemcategory.items %}
-
-
+
+
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/constants.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/constants.twig
index 6e72f2c1..a4e81950 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/constants.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/constants.twig
@@ -25,8 +25,13 @@
{%endif%}
{% endmacro %}
+{% macro mycolormain() %}
+{% set color = app.session.get('color') %}{% set colormain = color['main'] %}{{ colormain }}
+{% endmacro %}`
+
{% macro mystylewidget(entity) %}
{% set color = app.session.get('color') %}
+ {% set colormain = color['main'] %}
{% set colorheaderback = entity.colorheaderback %}
{% if colorheaderback is null %}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewalert.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewalert.html.twig
index 80184400..afeb39bd 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewalert.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewalert.html.twig
@@ -5,6 +5,7 @@
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
+{% set colormain = constants.mycolormain() %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
@@ -32,9 +33,14 @@
{% for alert in alerts %}
-
+
-
+ {% if alert.alertcategory.icon %}
+
+ {% else %}
+
+ {% endif %}
+
{{ alert.title }}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig
index 71d78a99..e59bb815 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig
@@ -5,6 +5,7 @@
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
+{% set colormain = constants.mycolormain() %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
@@ -60,7 +61,7 @@
{% for bookmark in bookmarks %}
-
+
{% if bookmark.target == 'frame' %}
@@ -133,7 +134,7 @@
{% endif %}
-
+
{% if item.content %}
{% endif %}
diff --git a/src/ninegate-1.0/web/uploads/icon/icon_chart.png b/src/ninegate-1.0/web/uploads/icon/icon_chart.png
new file mode 100644
index 00000000..9ae9a5db
Binary files /dev/null and b/src/ninegate-1.0/web/uploads/icon/icon_chart.png differ
diff --git a/src/ninegate-1.0/web/uploads/icon/icon_chartpie.png b/src/ninegate-1.0/web/uploads/icon/icon_chartpie.png
new file mode 100644
index 00000000..c457e174
Binary files /dev/null and b/src/ninegate-1.0/web/uploads/icon/icon_chartpie.png differ
diff --git a/src/ninegate-1.0/web/uploads/icon/icon_users.png b/src/ninegate-1.0/web/uploads/icon/icon_users.png
new file mode 100644
index 00000000..5ec1a651
Binary files /dev/null and b/src/ninegate-1.0/web/uploads/icon/icon_users.png differ
diff --git a/tmpl/ninegate-init-01.sql b/tmpl/ninegate-init-01.sql
index 47a8b19f..f3efe75a 100644
--- a/tmpl/ninegate-init-01.sql
+++ b/tmpl/ninegate-init-01.sql
@@ -47,6 +47,15 @@ INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `f
(1570, 1500, 1570, 'Chartes', 'cadoles_portal_config_notice', 'fa-info', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1580, 1500, 1580, 'Icônes', 'cadoles_portal_config_icon', 'fa-bug', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
+(2500, NULL, 2500, 'MODULES', NULL, 'fa-cubes', 'ROLE_ADMIN,ROLE_MODO', 'module_activate'),
+(2510, 2500, 2510, 'Pages', 'cadoles_portal_config_page', 'fa-file', 'ROLE_ADMIN,ROLE_MODO', 'page_activate'),
+(2520, 2500, 2520, 'Items', 'cadoles_portal_config_item', 'fa-desktop', 'ROLE_ADMIN,ROLE_MODO', 'item_activate'),
+(2530, 2500, 2530, 'Annonces', 'cadoles_portal_config_alert', 'fa-bell', 'ROLE_ADMIN,ROLE_MODO', 'alert_activate'),
+(2540, 2500, 2540, 'Calendriers', 'cadoles_portal_config_calendar', 'fa-calendar', 'ROLE_ADMIN,ROLE_MODO', 'calendar_activate'),
+(2550, 2500, 2550, 'Blogs', 'cadoles_portal_config_blog', 'fa-paper-plane', 'ROLE_ADMIN,ROLE_MODO', 'blog_activate'),
+(2560, 2500, 2560, 'Flux', 'cadoles_portal_config_flux', 'fa-rss', 'ROLE_ADMIN,ROLE_MODO', 'flux_activate'),
+(2570, 2500, 2570, 'Chartes', 'cadoles_portal_config_notice', 'fa-info', 'ROLE_ADMIN,ROLE_MODO', 'notice_activate'),
+(2580, 2500, 2580, 'Icônes', 'cadoles_portal_config_icon', 'fa-bug', 'ROLE_ADMIN,ROLE_MODO', 'module_activate'),
(7000, NULL, 7000, 'CRON', NULL, 'fa-bolt', 'ROLE_ADMIN', 'cron_activate'),
(7010, 7000, 7010, 'Jobs', 'cadoles_cron_config', 'fa-bullseye', 'ROLE_ADMIN', 'cron_activate'),
diff --git a/tmpl/ninegate-template.yml b/tmpl/ninegate-template.yml
index a0374d06..27ba66d5 100644
--- a/tmpl/ninegate-template.yml
+++ b/tmpl/ninegate-template.yml
@@ -26,9 +26,22 @@ parameters:
%end if
# Activation module
+ portal_module_activate: false
cron_activate: true
+%if %%getVar("ninegate_activate_portal", 'non') == "oui"
portal_activate: true
-
+%else
+ portal_activate: false
+
+%if %%getVar("ninegate_activate_item", 'non') == "oui"
+ portal_module_activate: true
+ portal_item_activate: true
+%else
+ portal_item_activate: false
+%end if
+
+%end if
+
# Information de base de l'annuaire
ldap_host: %%adresse_ip_ldap
ldap_port: %%ldap_port
@@ -68,12 +81,16 @@ parameters:
# Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire
%if %%getVar("ninegate_syncldap", 'non') == "oui"
ldap_sync: true
+%else
+ ldap_sync: false
+%end if
+
+%if %%getVar("ninegate_test_conf_ldap", 'non') == "oui"
ldap_baseuser: ou=users,ou=%%ninegate_organization,o=gouv,c=fr
ldap_baseniveau01: ou=%%ninegate_niveau01branche,ou=%%ninegate_organization,o=gouv,c=fr
ldap_baseniveau02: ou=%%ninegate_niveau02branche,ou=%%ninegate_organization,o=gouv,c=fr
ldap_basegroup: ou=groups,ou=%%ninegate_organization,o=gouv,c=fr
%else
- ldap_sync: false
ldap_baseuser:
ldap_baseniveau01:
ldap_baseniveau02: