This commit is contained in:
afornerot 2019-06-21 10:52:22 +02:00
parent 9e9bfead12
commit 102ed218a9
25 changed files with 588 additions and 104 deletions

View File

@ -18,26 +18,25 @@
<variables>
<family name='Ninegate'>
<variable name="activer_eportail" type="oui/non" description="Activer ePortail" hidden='True' exists='False'>
<value>non</value>
</variable>
<variable name="activer_eportail" type="oui/non" description="Activer ePortail" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_limesurvey" type="oui/non" description="Activer Limesurvey" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_moodle" type="oui/non" description="Activer Moodle" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_opensondage" type="oui/non" description="Activer Opensondage" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_piwik" type="oui/non" description="Activer Piwik" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_sondepiwik_local" type="oui/non" description="Activer Sonde Piwik" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_wordpress" type="oui/non" description="Activer Wordpress" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_limesurvey" type="oui/non" description="Activer Limesurvey" hidden='True' exists='False'>
<value>non</value>
</variable>
<variable name="activer_moodle" type="oui/non" description="Activer Moodle" hidden='True' exists='False'>
<value>non</value>
</variable>
<variable name='moodle_apikey' type='string' description="API Key pour accéder au webservice Moodle" hidden='True' exists='False' />
<variable name="activer_wordpress" type="oui/non" description="Activer Wordpress" hidden='True' exists='False'>
<value>non</value>
</variable>
<variable name='ninegate_test_sonde' type='oui/non' hidden='True'/>
<variable name='ninegate_test_conf_cadolesldap' type='oui/non' hidden='True'/>
<variable name='ninegate_test_conf_ldap' type='oui/non' hidden='True'/>
<variable type='oui/non' name='activer_ninegate' description='Activer Ninegate'><value>oui</value></variable>
<variable type='string' name='ninegate_masteridentity' description="Maître de l'Identité" mandatory='True'><value>LDAP</value></variable>
@ -114,6 +113,17 @@
<!-- LIMESURVEY -->
<variable type="oui/non" name='ninegate_activate_widlimesurvey' description='Activer le widget Limesurvey' mandatory='True'>
<value>non</value>
</variable>
<variable type='string' name='ninegate_widlimesurvey_url' description='URL complète de votre Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widlimesurvey_apiuser' description='API User de votre Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widlimesurvey_apikey' description='API Key de votre Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widlimesurvey_syncenvole' description='URL Posh-Profil pour synchronisation Limesurvey' mandatory='True' />
<!-- MOODLE -->
<variable type="oui/non" name='ninegate_activate_widmoodle' description='Activer le widget Moodle' mandatory='True'>
@ -126,14 +136,19 @@
<!-- LIMESURVEY -->
<variable type="oui/non" name='ninegate_activate_widlimesurvey' description='Activer le widget Limesurvey' mandatory='True'>
<!-- OPENSONDAGE -->
<variable type="oui/non" name='ninegate_activate_widopensondage' description='Activer le widget Opensondage' mandatory='True'>
<value>non</value>
</variable>
<variable type='string' name='ninegate_widlimesurvey_url' description='URL complète de votre Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widlimesurvey_apiuser' description='API User de votre Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widlimesurvey_apikey' description='API Key de votre Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widlimesurvey_syncenvole' description='URL Posh-Profil pour synchronisation Limesurvey' mandatory='True' />
<variable type='string' name='ninegate_widopensondage_url' description='URL complète de votre Opensondage' mandatory='True' />
<!-- PIWIK -->
<variable type="oui/non" name='ninegate_activate_widpiwik' description='Activer le widget Piwik' mandatory='True'>
<value>non</value>
</variable>
<variable type='string' name='ninegate_widpiwik_url' description='URL complète de votre Piwik' mandatory='True' />
@ -170,7 +185,7 @@
<separator name="ninegate_syncldap">Paramètres associés à l'Annuaire</separator>
<separator name="ninegate_niveau01label">Paramètres associés aux look de l'application</separator>
<separator name="ninegate_activate_portal">Paramètres associés aux modules à activer</separator>
<separator name="ninegate_activate_widmoodle">Paramètres associés au Portail</separator>
<separator name="ninegate_activate_widlimesurvey">Paramètres associés au Portail</separator>
<separator name="ninegate_noreply">Paramètres associés aux Mails</separator>
<separator name="ninegate_db_mode">Paramètres associés à la Base de Données</separator>
</separators>
@ -306,12 +321,14 @@
<!-- AFFICHAGE EN FONCTION Du MODULE PORTAL -->
<!-- AFFICHAGE EN FONCTION DU MODULE PORTAL -->
<condition name='hidden_if_in' source='ninegate_activate_portal'>
<param>non</param>
<target type='variable'>ninegate_activate_widlimesurvey</target>
<target type='variable'>ninegate_activate_widmoodle</target>
<target type='variable'>ninegate_activate_widopensondage</target>
<target type='variable'>ninegate_activate_widpiwik</target>
<target type='variable'>ninegate_activate_widwordpress</target>
</condition>
@ -329,7 +346,7 @@
<!-- AFFICHAGE EN FONCTION Du MODULE SYNCENVOLE -->
<!-- AFFICHAGE EN FONCTION DU MODULE SYNCENVOLE -->
<condition name='hidden_if_in' source='ninegate_activate_syncenvole'>
<param>non</param>
@ -340,46 +357,6 @@
<!-- AFFICHAGE EN FONCTION DU WIDGET MOODLE -->
<fill name='calc_multi_condition' target='ninegate_activate_widmoodle'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widmoodle'>
<param>non</param>
<target type='variable'>ninegate_widmoodle_url</target>
<target type='variable'>ninegate_widmoodle_apikey</target>
<target type='variable'>ninegate_widmoodle_syncenvole</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widmoodle_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param name='match'>/moodle</param>
<param name='default_mismatch'>None</param>
</fill>
<fill name='calc_multi_condition' target='ninegate_widmoodle_apikey'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param type='eole' name='match' hidden='False'>moodle_apikey</param>
<param name='default_mismatch'>None</param>
</fill>
<fill name='calc_multi_condition' target='ninegate_widmoodle_syncenvole'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param name='match'>/posh-profil</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET LIMESURVEY -->
<fill name='calc_multi_condition' target='ninegate_activate_widlimesurvey'>
<param>oui</param>
@ -428,6 +405,112 @@
<!-- AFFICHAGE EN FONCTION DU WIDGET MOODLE -->
<fill name='calc_multi_condition' target='ninegate_activate_widmoodle'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widmoodle'>
<param>non</param>
<target type='variable'>ninegate_widmoodle_url</target>
<target type='variable'>ninegate_widmoodle_apikey</target>
<target type='variable'>ninegate_widmoodle_syncenvole</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widmoodle_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param name='match'>/moodle</param>
<param name='default_mismatch'>None</param>
</fill>
<fill name='calc_multi_condition' target='ninegate_widmoodle_apikey'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param type='eole' name='match' hidden='False'>moodle_apikey</param>
<param name='default_mismatch'>None</param>
</fill>
<fill name='calc_multi_condition' target='ninegate_widmoodle_syncenvole'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_moodle</param>
<param name='match'>/posh-profil</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET OPENSONDAGE -->
<fill name='calc_multi_condition' target='ninegate_activate_widopensondage'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_opensondage</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widopensondage'>
<param>non</param>
<target type='variable'>ninegate_widopensondage_url</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widopensondage_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_opensondage</param>
<param name='match'>/opensondage</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET PIWIK -->
<fill name='calc_multi_condition' target='ninegate_activate_widpiwik'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_piwik</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widpiwik'>
<param>non</param>
<target type='variable'>ninegate_widpiwik_url</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widpiwik_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_piwik</param>
<param name='match'>/piwik</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET SONDE -->
<auto name='calc_multi_condition' target='ninegate_test_sonde'>
<param>oui</param>
<param name="operator">OR</param>
<param type='eole' name='condition_1' hidden='False'>activer_sondepiwik_local</param>
<param type='eole' name='condition_2' hidden='False'>activer_piwik</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
</auto>
<!-- AFFICHAGE EN FONCTION DU WIDGET WORDPRESS -->
<fill name='calc_multi_condition' target='ninegate_activate_widwordpress'>
<param>oui</param>

View File

@ -9,6 +9,9 @@ twig:
cron_activate: %cron_activate%
portal_activate: %portal_activate%
item_activate: %item_activate%
activate_widsonde: %activate_widsonde%
widsonde_url: %widsonde_url%
eportail_sync: %eportail_sync%
moderegistration: %moderegistration%

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}VREmbRVmS5dJHhzmPEdIJuBKZun8MPqc
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}vVFWm4leqk5s1yL2v3YhSABW45sQmnWx
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');

View File

@ -517,11 +517,13 @@ a.item-heart {
width:40px;
border-radius: 100%;
margin: 5px;
cursor: pointer;
}
.widgetheader .title {
position: absolute;
margin-left:50px;
cursor: pointer;
}
.widgetheader iframe,

View File

@ -155,5 +155,9 @@
{% endblock %}
</script>
{% if activate_widsonde %}
<script src='{{ widsonde_url }}?appli=Ninegate'></script>
{% endif %}
</body>
</html>

View File

@ -17,6 +17,8 @@ use Cadoles\PortalBundle\Entity\Pagecategory;
use Cadoles\PortalBundle\Entity\Widget;
use Cadoles\PortalBundle\Entity\Appexternal;
use Cadoles\PortalBundle\Entity\Flux;
use Cadoles\PortalBundle\Entity\Itemcategory;
use Cadoles\PortalBundle\Entity\Item;
class InitDataCommand extends ContainerAwareCommand
{
@ -33,8 +35,12 @@ class InitDataCommand extends ContainerAwareCommand
{
$em = $this->getContainer()->get('doctrine')->getEntityManager();
$alias =$this->getContainer()->getParameter('alias');
$activate_widlimesurvey =$this->getContainer()->getParameter('activate_widlimesurvey');
$activate_widmoodle =$this->getContainer()->getParameter('activate_widmoodle');
$activate_widlimesurvey = $this->getContainer()->getParameter('activate_widlimesurvey');
$activate_widmoodle = $this->getContainer()->getParameter('activate_widmoodle');
$activate_widopensondage = $this->getContainer()->getParameter('activate_widopensondage');
$activate_widpiwik = $this->getContainer()->getParameter('activate_widpiwik');
$activate_widwordpress = $this->getContainer()->getParameter('activate_widwordpress');
$output->writeln('PORTAL = Default Data');
@ -47,11 +53,21 @@ class InitDataCommand extends ContainerAwareCommand
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator());
$metadata = $em->getClassMetaData('CadolesPortalBundle:Itemcategory');
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator());
$metadata = $em->getClassMetaData('CadolesPortalBundle:Item');
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator());
$metadata = $em->getClassMetaData('CadolesPortalBundle:Widget');
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator());
// Création appexternal
//== APPEXTERNAL =========================================================================================================================================
$output->writeln(' > Appexternal');
$entity = $em->getRepository('CadolesPortalBundle:Appexternal')->findoneby(["name"=>"Limesurvey"]);
if(!$entity&&$activate_widlimesurvey) {
$entity=new Appexternal;
@ -76,8 +92,9 @@ class InitDataCommand extends ContainerAwareCommand
$em->flush();
}
// Creation des icons
//== ICONE ===============================================================================================================================================
$output->writeln(' > Creation Icons');
$finder = new Finder();
$finder->in('web/uploads/icon/');
$finder->name('icon_*');
@ -92,7 +109,9 @@ class InitDataCommand extends ContainerAwareCommand
}
$em->flush();
// Création des Flux
//== FLUX ================================================================================================================================================
$output->writeln(' > Creation Flux');
$entityFlux = $em->getRepository('CadolesPortalBundle:Flux')->find(-2000);
if(!$entityFlux&&($activate_widlimesurvey)) {
$entityFlux = new Flux();
@ -133,8 +152,9 @@ class InitDataCommand extends ContainerAwareCommand
$em->flush();
}
// Creation des pagecategory
//== PAGECATEGORY ========================================================================================================================================
$output->writeln(' > Creation Pagecategory');
$entityPagecategory = $em->getRepository('CadolesPortalBundle:Pagecategory')->find(-100);
if(!$entityPagecategory) {
$entityPagecategory = new Pagecategory();
@ -173,10 +193,140 @@ class InitDataCommand extends ContainerAwareCommand
$em->persist($entityPagecategory);
}
//== ITEMCATEGORY========================================================================================================================================
$output->writeln(' > Creation Item Category');
$entityItemcategoryapp = $em->getRepository('CadolesPortalBundle:Itemcategory')->find(-100);
if(!$entityItemcategoryapp) {
$entityItemcategoryapp = new Itemcategory();
$entityItemcategoryapp->setId(-100);
$entityItemcategoryapp->setRowOrder(0);
$entityItemcategoryapp->setLabel('Applications');
$em->persist($entityItemcategoryapp);
}
$entityItemcategoryadm = $em->getRepository('CadolesPortalBundle:Itemcategory')->find(-99);
if(!$entityItemcategoryadm) {
$entityItemcategoryadm = new Itemcategory();
$entityItemcategoryadm->setId(-99);
$entityItemcategoryadm->setRowOrder(99);
$entityItemcategoryadm->setLabel('Administration');
$em->persist($entityItemcategoryadm);
}
//== ITEM ===============================================================================================================================================
$output->writeln(' > Creation Item');
// Item Limesurvey
if($activate_widlimesurvey) {
$widlimesurvey_url =$this->getContainer()->getParameter('widlimesurvey_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-374);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_limesurvey.png"]);
$entityItem = new Item();
$entityItem->setId(-374);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Limesurvey');
$entityItem->SetSubtitle("Application de sondage");
$entityItem->setIcon($entityicon);
$entityItem->setColor("328637");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
}
$entityItem->setUrl($widlimesurvey_url);
$em->persist($entityItem);
}
// Item Moodle
if($activate_widmoodle) {
$widmoodle_url =$this->getContainer()->getParameter('widmoodle_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-387);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_moodle.png"]);
$entityItem = new Item();
$entityItem->setId(-387);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Moodle');
$entityItem->SetSubtitle("Application de eLearning");
$entityItem->setIcon($entityicon);
$entityItem->setColor("f77f11");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
}
$entityItem->setUrl($widmoodle_url);
$em->persist($entityItem);
}
// Item Opensondage
if($activate_widopensondage) {
$widopensondage_url =$this->getContainer()->getParameter('widopensondage_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-383);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_calendar.png"]);
$entityItem = new Item();
$entityItem->setId(-383);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Opensondage');
$entityItem->SetSubtitle("Application de Sondage par Date");
$entityItem->setIcon($entityicon);
$entityItem->setColor("1ba39c");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
}
$entityItem->setUrl($widopensondage_url);
$em->persist($entityItem);
}
// Item Piwik
if($activate_widpiwik) {
$widpiwik_url =$this->getContainer()->getParameter('widpiwik_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-380);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_trends.png"]);
$entityItem = new Item();
$entityItem->setId(-380);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Piwik');
$entityItem->SetSubtitle("Application de Statistique de Visite");
$entityItem->setIcon($entityicon);
$entityItem->setColor("1ba39c");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryadm);
}
$entityItem->setUrl($widpiwik_url);
$em->persist($entityItem);
}
// Item Wordpress
if($activate_widwordpress) {
$widwordpress_url =$this->getContainer()->getParameter('widwordpress_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-400);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_wordpress.png"]);
$entityItem = new Item();
$entityItem->setId(-400);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Wordpress');
$entityItem->SetSubtitle("Application de Blog");
$entityItem->setIcon($entityicon);
$entityItem->setColor("96281b");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
}
$entityItem->setUrl($widwordpress_url);
$em->persist($entityItem);
}
//== WIDGET ============================================================================================================================================
$output->writeln(' > Creation Widget');
// Widget URL
$output->writeln(' > Creation Widget');
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-2000);
if(!$entityWidget) $entityWidget = new Widget();
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_ribbon.png"]);

View File

@ -461,7 +461,18 @@ class PagewidgetController extends Controller
// Trie des items
$itemsordered = $items->getIterator();
$itemsordered->uasort(function ($first, $second) {
return (int) $first->getRowOrder() > (int) $second->getRowOrder() ? 1 : -1;
if((int) $first->getRowOrder() > (int) $second->getRowOrder())
$return=1;
elseif((int) $first->getRowOrder() == (int) $second->getRowOrder()) {
if($first->getTitle() > $second->getTitle())
$return=1;
else
$return=-1;
}
else
$return=-1;
return $return;
});
// Catégories affichées
@ -780,6 +791,7 @@ class PagewidgetController extends Controller
"image" => $imgurl,
"color" => $flux->getColor(),
"fluxid" => $flux->getId(),
"fluxtitle" => $flux->getTitle(),
);
array_push($feeds,$tmp);
@ -973,6 +985,7 @@ class PagewidgetController extends Controller
"image" => $imgurl,
// "color" => $flux->getColor(),
"fluxid" => 0,
"fluxname" => $entity->getName(),
));
$nbflux++;

View File

@ -41,6 +41,14 @@ class Icon
*/
private $items;
/**
* @var ArrayCollection $itemcategorys
* @var Itemcategory
*
* @ORM\OneToMany(targetEntity="Itemcategory", mappedBy="icon", cascade={"persist"}, orphanRemoval=false)
*/
private $itemcategorys;
/**
* @var ArrayCollection $alertcategorys
* @var Alertcategory
@ -73,14 +81,13 @@ class Icon
* @ORM\OneToMany(targetEntity="Bookmark", mappedBy="icon", cascade={"persist"}, orphanRemoval=false)
*/
private $bookmarks;
/**
* Constructor
*/
public function __construct()
{
$this->items = new \Doctrine\Common\Collections\ArrayCollection();
$this->itemcategorys = 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();
@ -179,6 +186,40 @@ class Icon
return $this->items;
}
/**
* Add itemcategory
*
* @param \Cadoles\PortalBundle\Entity\Itemcategory $itemcategory
*
* @return Icon
*/
public function addItemcategory(\Cadoles\PortalBundle\Entity\Itemcategory $itemcategory)
{
$this->itemcategorys[] = $itemcategory;
return $this;
}
/**
* Remove itemcategory
*
* @param \Cadoles\PortalBundle\Entity\Itemcategory $itemcategory
*/
public function removeItemcategory(\Cadoles\PortalBundle\Entity\Itemcategory $itemcategory)
{
$this->itemcategorys->removeElement($itemcategory);
}
/**
* Get itemcategorys
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getItemcategorys()
{
return $this->itemcategorys;
}
/**
* Add alertcategory
*

View File

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

View File

@ -31,6 +31,13 @@ class Itemcategory
*/
private $label;
/**
* @var string
*
* @ORM\Column(name="color", type="string", length=24, nullable=true)
*/
private $color;
/**
* @var integer
*
@ -38,16 +45,29 @@ class Itemcategory
*/
private $rowOrder;
/**
* @ORM\ManyToOne(targetEntity="Icon", inversedBy="itemcategorys")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $icon;
/**
* @var ArrayCollection $groups
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="Item", mappedBy="itemcategory", cascade={"persist"}, orphanRemoval=true)
* @ORM\OrderBy({"rowOrder" = "ASC"})
* @ORM\OrderBy({"rowOrder" = "ASC","title" = "ASC"})
*/
protected $items;
// A garder pour forcer l'id en init
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Constructor
*/
@ -90,6 +110,30 @@ class Itemcategory
return $this->label;
}
/**
* Set color
*
* @param string $color
*
* @return Itemcategory
*/
public function setColor($color)
{
$this->color = $color;
return $this;
}
/**
* Get color
*
* @return string
*/
public function getColor()
{
return $this->color;
}
/**
* Set rowOrder
*
@ -114,6 +158,30 @@ class Itemcategory
return $this->rowOrder;
}
/**
* Set icon
*
* @param \Cadoles\PortalBundle\Entity\Icon $icon
*
* @return Itemcategory
*/
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 item
*

View File

@ -66,6 +66,13 @@ class Pagewidget
*/
protected $border;
/**
* @var boolean
*
* @ORM\Column(name="opened", type="boolean", options={"default":true})
*/
protected $opened;
/**
* @var string
*
@ -134,7 +141,6 @@ class Pagewidget
private $slides;
/**
* Constructor
*/
@ -298,6 +304,30 @@ class Pagewidget
return $this->border;
}
/**
* Set opened
*
* @param boolean $opened
*
* @return Pagewidget
*/
public function setOpened($opened)
{
$this->opened = $opened;
return $this;
}
/**
* Get opened
*
* @return boolean
*/
public function getOpened()
{
return $this->opened;
}
/**
* Set colorheaderback
*

View File

@ -73,6 +73,13 @@ class Widget
*/
protected $border;
/**
* @var boolean
*
* @ORM\Column(name="opened", type="boolean", options={"default":true})
*/
protected $opened;
/**
* @var string
*
@ -130,7 +137,6 @@ class Widget
}
/**
* Constructor
*/
@ -317,6 +323,30 @@ class Widget
return $this->border;
}
/**
* Set opened
*
* @param boolean $opened
*
* @return Widget
*/
public function setOpened($opened)
{
$this->opened = $opened;
return $this;
}
/**
* Get opened
*
* @return boolean
*/
public function getOpened()
{
return $this->opened;
}
/**
* Set colorheaderback
*

View File

@ -48,6 +48,10 @@ class PagewidgetType extends AbstractType
'label' => "Ajuster la Hauteur au Contenu",
'choices' => array("oui" => "1","non" => "0")
])
->add('opened', ChoiceType::class, [
'label' => "Afficher le corps du widget à l'ouverture",
'choices' => array("oui" => "1","non" => "0")
])
->add('colorheaderback', TextType::class, [
'label' => "Couleur de Fond de l'Entête",
'required' => false,

View File

@ -233,6 +233,22 @@
// Création des slick
slick();
// Sur le click des titres de widgets ouvrir / fermer le widget
$( ".widgetheader .title" ).click(function() {
showhideWidget(this);
});
$( ".widgetheader .logo" ).click(function() {
showhideWidget(this);
});
// Sur click item à sonder
{% if activate_widsonde %}
$( ".linktosonde" ).click(function() {
title=$(this).attr("data-sonde");
$.getScript( "{{ widsonde_url }}?appli="+title );
});
{% endif %}
// cacher le loader
$("#loader").hide();
});
@ -254,6 +270,16 @@
});
}
function showhideWidget(elem) {
// on récupère le parent widget conteneur
widget=$(elem).parent().parent();
widget.children(".widgetbody" ).toggle();
// On recalcule les grilles
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid);
}
// Modification de la localisation d'un widget
function updateLocalisation() {
$('.colcontainer .col').each(function(index) {

View File

@ -166,6 +166,10 @@
{% set stylewidgetbody = stylewidgetbody ~ "padding:10px" %}
{% endif %}
{% if not entity.opened %}
{% set stylewidgetbody = stylewidgetbody ~ "display:none" %}
{% endif %}
{{ stylewidgetbody }}
{% endmacro %}`

View File

@ -66,6 +66,7 @@
{{ form_row(form.height) }}
{{ form_row(form.autoajust) }}
{{ form_row(form.border) }}
{{ form_row(form.opened) }}
</div>
<div id="col3" class="col-xs-4">

View File

@ -63,7 +63,7 @@
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}">
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
<a href="{{ item.url }}" target="_blank">
<a class="linktosonde" data-sonde="{{ item.itemcategory.label }}" href="{{ item.url }}" target="_blank">
<div class="item-link clearfix">

View File

@ -59,11 +59,11 @@
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
{% if bookmark.target == 'frame' %}
<a style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
{% elseif bookmark.target == "_self" %}
<a href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
{% else %}
<a href="{{ bookmark.url }}" target="{{ bookmark.target }}">
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{{ bookmark.target }}">
{% endif %}
<div class="item-link clearfix">

View File

@ -94,7 +94,7 @@
{% endif %}
<div class="grid-item grid-preview feed flux-{{ feed.fluxid }}">
<a href="{{ feed.link }}" target="_blank">
<a class="linktosonde" data-sonde="Flux = {{ feed.fluxtitle }}" href="{{ feed.link }}" target="_blank">
{% if feed.image is not empty %}
<img src="{{feed.image}}" width="100%">
{% endif %}

View File

@ -65,11 +65,11 @@
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
{% if bookmark.target == 'frame' %}
<a style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
{% elseif bookmark.target == "_self" %}
<a href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
{% else %}
<a href="{{ bookmark.url }}" target="{{ bookmark.target }}">
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{{ bookmark.target }}">
{% endif %}
<div class="item-link clearfix">
@ -153,11 +153,11 @@
{% else %}
{% if item.target == 'frame' %}
<a style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url }}')">
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url }}')">
{% elseif item.target == "_self" %}
<a href="{{ item.url }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
{% else %}
<a href="{{ item.url }}" target="{{ item.target }}">
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{{ item.target }}">
{% endif %}
{% endif %}

View File

@ -31,11 +31,11 @@
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
{% if target == 'frame' %}
<a style="cursor:pointer; {{ stylelink }}" onClick="showFrameitem('link{{ entity.id }}','{{ url }}')">
<a class="linktosonde" data-sonde="{{ entity.name }}" style="cursor:pointer; {{ stylelink }}" onClick="showFrameitem('link{{ entity.id }}','{{ url }}')">
{% elseif target == "_self" %}
<a style="{{ stylelink }}"href="{{ url }}" target="{% if access=="user" %}_top{% else %}{{ target }}{% endif %}">
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}"href="{{ url }}" target="{% if access=="user" %}_top{% else %}{{ target }}{% endif %}">
{% else %}
<a style="{{ stylelink }}" href="{{ url }}" target="{{ target }}">
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}" href="{{ url }}" target="{{ target }}">
{% endif %}
{% if entity.icon %}
<img src="/{{ alias }}/{{ entity.icon.label }}" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />

View File

@ -1,12 +1,15 @@
> Dépendance du paquet
- sondepiwik
- poshprofil
> Rendre l'alias paramétrage par genconfig
> Ne pas supprimer/modifier les icons système
> Annonces pouvant être masquées par les utilisateurs
> Calendrier export ICS
> Pages duplicable
> Déplacement de widget vers une autre page du meme user
> widget ToDo
@ -15,21 +18,16 @@
> Items Envole
> Synchronisation posh-profil à revoir
> Séparateur milier sur datatable
> Donner des permissions d'écritures sur les calendriers comme sur le blog
> Que faire si lock sur cron depuis trop longtemps
> Couleur sur blog
> Couleur et icone sur Itemcategory (base faite reste à implémenter dans les écrans)
> Import de compte
> Widget opened/closed
> Widget Moodle
> Widget Open Office
> Role Animateur de Groupe
> Widget invitation
> Notification
> Synchronisation posh-profil
> Favorie sur appexternal
> Montée de version LemonLDAP
> France Connect Agent
@ -41,8 +39,4 @@
> Widgets Envole
- Limesurvey
- Limesurvey Admin
- Moodle
- Wordpress
- Opensondage

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -157,12 +157,12 @@ parameters:
ldap_template: open
%end if
# Si masteridentity est à LDAP = quel champs sont à récupérer
# Si masteridentity est à LDAP = quel champs sont à récupérer = faudrait templetiser dans genconfig
ldap_username: uid
ldap_firstname: givenname
ldap_lastname: sn
ldap_email: mail
ldap_usersadmin: [admin,prof.6a]
ldap_usersadmin: [admin]
# Activation Widget
%if %%getVar("ninegate_activate_widlimesurvey", 'non') == "oui"
@ -184,6 +184,31 @@ parameters:
activate_widmoodle: false
%end if
%if %%getVar("ninegate_activate_widopensondage", 'non') == "oui"
activate_widopensondage: true
widopensondage_url: %%ninegate_widopensondage_url
%else
activate_widwordpress: false
%end if
%if %%getVar("ninegate_activate_widpiwik", 'non') == "oui"
activate_widpiwik: true
widpiwik_url: %%ninegate_widpiwik_url
%else
activate_widpiwik: false
%end if
%if %%getVar("activer_sondepiwik_local", 'non') == "oui"
activate_widsonde: true
widsonde_url: /sondepiwik/envoleTrackeur.js.php
%else if %%getVar("activer_piwik", 'non') == "oui"
activate_widsonde: true
widsonde_url: /piwik/envoleTrackeur.js.php
%else
activate_widsonde: false
widsonde_url:
%end if
%if %%getVar("ninegate_activate_widwordpress", 'non') == "oui"
activate_widwordpress: true
widwordpress_url: %%ninegate_widwordpress_url