svg
This commit is contained in:
parent
1f3f2246fd
commit
1a28fe2f5a
|
@ -154,7 +154,7 @@ ivory_ck_editor:
|
||||||
language: fr
|
language: fr
|
||||||
toolbar: "my_toolbar_1"
|
toolbar: "my_toolbar_1"
|
||||||
uiColor: "#ffffff"
|
uiColor: "#ffffff"
|
||||||
extraPlugins: ["html5video","pastebase64"]
|
extraPlugins: ["html5video"]
|
||||||
light_config:
|
light_config:
|
||||||
language: fr
|
language: fr
|
||||||
toolbar: "my_toolbar_2"
|
toolbar: "my_toolbar_2"
|
||||||
|
|
|
@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
|
||||||
(-100, 'DRAAF', '130007107');
|
(-100, 'DRAAF', '130007107');
|
||||||
|
|
||||||
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
|
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
|
||||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}vVciL1BZlGqITdyEI5am1J21xEgy2M02
|
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}eyoxoh9yJzJyNAacnf9gxyZbtRWITzXF
|
||||||
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -509,10 +509,28 @@ class GroupController extends Controller
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
// Notification message
|
||||||
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
||||||
$message="Inscription de l'utilisateur<br>".$user->getLastname()." ".$user->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
$message="Inscription de l'utilisateur<br>".$user->getLastname()." ".$user->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$userid,$groupid,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$userid,$groupid,$message);
|
||||||
|
|
||||||
|
// Notification mail auprès de la personne inscrite
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
|
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
|
||||||
|
$template="template";
|
||||||
|
$mail_params=array(
|
||||||
|
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
|
"body_html"=>nl2br($text),
|
||||||
|
"body_text"=>$text
|
||||||
|
);
|
||||||
|
$to = $user->getEmail();
|
||||||
|
$from = $this->getParameter('noreply');;
|
||||||
|
$fromName = $this->get('session')->get('appname');
|
||||||
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retour
|
||||||
$response = new Response(json_encode($output));
|
$response = new Response(json_encode($output));
|
||||||
$response->headers->set('Content-Type', 'application/json');
|
$response->headers->set('Content-Type', 'application/json');
|
||||||
return $response;
|
return $response;
|
||||||
|
@ -535,15 +553,36 @@ class GroupController extends Controller
|
||||||
if($group->getFgAll()||$group->getFgTemplate())
|
if($group->getFgAll()||$group->getFgTemplate())
|
||||||
throw $this->createNotFoundException('Permission denied');
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
// Notification message
|
||||||
$data = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$userid,"group"=>$groupid));
|
$data = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$userid,"group"=>$groupid));
|
||||||
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
||||||
$message="Désinscription de l'utilisateur<br>".$user->getLastname()." ".$user->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();;
|
$message="Désinscription de l'utilisateur<br>".$user->getLastname()." ".$user->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();;
|
||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($data->getKeyvalue(),$userid,$groupid,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($data->getKeyvalue(),$userid,$groupid,$message);
|
||||||
|
|
||||||
|
// Desinscription
|
||||||
$em->remove($data);
|
$em->remove($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
// Notification mail auprès des managers
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
|
$text=$user->getUsername()." a été désinscrit dugroupe de travail : ".$group->getLabel();
|
||||||
|
$template="template";
|
||||||
|
$mail_params=array(
|
||||||
|
"subject" => $this->get('session')->get('appname')." : ".$user->getUsername()." = Désinscription au groupe de travail ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
|
"body_html"=>nl2br($text),
|
||||||
|
"body_text"=>$text
|
||||||
|
);
|
||||||
|
$managers=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$groupid,"fgmanager"=>true));
|
||||||
|
$to=array();
|
||||||
|
foreach($managers as $manager) {
|
||||||
|
array_push($to,$manager->getUser()->getEmail());
|
||||||
|
}
|
||||||
|
|
||||||
|
$from = $this->getParameter('noreply');;
|
||||||
|
$fromName = $this->get('session')->get('appname');
|
||||||
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
}
|
||||||
|
|
||||||
$response = new Response(json_encode($output));
|
$response = new Response(json_encode($output));
|
||||||
$response->headers->set('Content-Type', 'application/json');
|
$response->headers->set('Content-Type', 'application/json');
|
||||||
|
@ -557,14 +596,39 @@ class GroupController extends Controller
|
||||||
if($group->getFgAll()||$group->getFgTemplate())
|
if($group->getFgAll()||$group->getFgTemplate())
|
||||||
throw $this->createNotFoundException('Permission denied');
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
// Notification message
|
||||||
$usergroup = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$this->getUser(),"group"=>$id));
|
$usergroup = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$this->getUser(),"group"=>$id));
|
||||||
$user=$em->getRepository("CadolesCoreBundle:User")->find($this->getUser());
|
$user=$em->getRepository("CadolesCoreBundle:User")->find($this->getUser());
|
||||||
$message="Désinscription de l'utilisateur<br>".$user->getLastname()." ".$user->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();;
|
$message="Désinscription de l'utilisateur<br>".$user->getLastname()." ".$user->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();;
|
||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($usergroup->getKeyvalue(),$this->getUser()->getId(),$id,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($usergroup->getKeyvalue(),$this->getUser()->getId(),$id,$message);
|
||||||
|
|
||||||
|
// Desinscription
|
||||||
$em->remove($usergroup);
|
$em->remove($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
// Notification mail auprès des managers
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
|
$text=$user->getUsername()." a été désinscrit dugroupe de travail : ".$group->getLabel();
|
||||||
|
$template="template";
|
||||||
|
$mail_params=array(
|
||||||
|
"subject" => $this->get('session')->get('appname')." : ".$user->getUsername()." = Désinscription au groupe de travail ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
|
"body_html"=>nl2br($text),
|
||||||
|
"body_text"=>$text
|
||||||
|
);
|
||||||
|
$managers=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$group,"fgmanager"=>true));
|
||||||
|
$to=array();
|
||||||
|
foreach($managers as $manager) {
|
||||||
|
array_push($to,$manager->getUser()->getEmail());
|
||||||
|
}
|
||||||
|
|
||||||
|
$from = $this->getParameter('noreply');;
|
||||||
|
$fromName = $this->get('session')->get('appname');
|
||||||
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this->redirect($this->generateUrl("cadoles_core_user_group"));
|
return $this->redirect($this->generateUrl("cadoles_core_user_group"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,8 +351,25 @@ class UserController extends Controller
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
// Notification message
|
||||||
$message="Inscription de l'utilisateur<br>".$data->getLastname()." ".$data->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
$message="Inscription de l'utilisateur<br>".$data->getLastname()." ".$data->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$iduser,$idgroup,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$iduser,$idgroup,$message);
|
||||||
|
|
||||||
|
// Notification mail auprès de la personne inscrite
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
|
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
|
||||||
|
$template="template";
|
||||||
|
$mail_params=array(
|
||||||
|
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
|
"body_html"=>nl2br($text),
|
||||||
|
"body_text"=>$text
|
||||||
|
);
|
||||||
|
$to = $data->getEmail();
|
||||||
|
$from = $this->getParameter('noreply');;
|
||||||
|
$fromName = $this->get('session')->get('appname');
|
||||||
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ajout des modos
|
// Ajout des modos
|
||||||
|
@ -476,8 +493,25 @@ class UserController extends Controller
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
// notification message
|
||||||
$message="Inscription de l'utilisateur<br>".$data->getLastname()." ".$data->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
$message="Inscription de l'utilisateur<br>".$data->getLastname()." ".$data->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$id,$idgroup,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$id,$idgroup,$message);
|
||||||
|
|
||||||
|
// Notification mail auprès de la personne inscrite
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
|
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
|
||||||
|
$template="template";
|
||||||
|
$mail_params=array(
|
||||||
|
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
|
"body_html"=>nl2br($text),
|
||||||
|
"body_text"=>$text
|
||||||
|
);
|
||||||
|
$to = $data->getEmail();
|
||||||
|
$from = $this->getParameter('noreply');;
|
||||||
|
$fromName = $this->get('session')->get('appname');
|
||||||
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppression des groupes obsolètes
|
// Suppression des groupes obsolètes
|
||||||
|
@ -494,11 +528,34 @@ class UserController extends Controller
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult();
|
->getResult();
|
||||||
foreach($usergroups as $usergroup) {
|
foreach($usergroups as $usergroup) {
|
||||||
|
// Notification message
|
||||||
$message="Désinscription de l'utilisateur<br>".$data->getLastname()." ".$data->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
$message="Désinscription de l'utilisateur<br>".$data->getLastname()." ".$data->getFirstname()."<br>Par ".$this->getUser()->getLastname()." ".$this->getUser()->getFirstname();
|
||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($usergroup->getKeyvalue(),$id,$idgroup,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($usergroup->getKeyvalue(),$id,$idgroup,$message);
|
||||||
|
|
||||||
|
// Déscription
|
||||||
$em->remove($usergroup);
|
$em->remove($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
// Notification mail auprès des managers
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
|
$text=$data->getUsername()." a été désinscrit dugroupe de travail : ".$group->getLabel();
|
||||||
|
$template="template";
|
||||||
|
$mail_params=array(
|
||||||
|
"subject" => $this->get('session')->get('appname')." : ".$data->getUsername()." = Désinscription au groupe de travail ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
|
"body_html"=>nl2br($text),
|
||||||
|
"body_text"=>$text
|
||||||
|
);
|
||||||
|
$managers=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$group,"fgmanager"=>true));
|
||||||
|
$to=array();
|
||||||
|
foreach($managers as $manager) {
|
||||||
|
array_push($to,$manager->getUser()->getEmail());
|
||||||
|
}
|
||||||
|
|
||||||
|
$from = $this->getParameter('noreply');;
|
||||||
|
$fromName = $this->get('session')->get('appname');
|
||||||
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -843,7 +900,7 @@ class UserController extends Controller
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Email à destination de l'inscript pour le prévenir qu'il dispose d'un compte
|
// Email à destination de l'inscrit pour le prévenir qu'il dispose d'un compte
|
||||||
$url = $this->generateUrl('cadoles_core_resetpwd01', [], UrlGeneratorInterface::ABSOLUTE_URL);
|
$url = $this->generateUrl('cadoles_core_resetpwd01', [], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||||
$text ="Vous venez d'être inscrit au portail = ".$appname."\n\n";
|
$text ="Vous venez d'être inscrit au portail = ".$appname."\n\n";
|
||||||
$text.="Login = ".$username."\n";
|
$text.="Login = ".$username."\n";
|
||||||
|
|
|
@ -869,4 +869,38 @@ class Group
|
||||||
{
|
{
|
||||||
return $this->messages;
|
return $this->messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add calendarevent
|
||||||
|
*
|
||||||
|
* @param \Cadoles\PortalBundle\Entity\Calendarevent $calendarevent
|
||||||
|
*
|
||||||
|
* @return Group
|
||||||
|
*/
|
||||||
|
public function addCalendarevent(\Cadoles\PortalBundle\Entity\Calendarevent $calendarevent)
|
||||||
|
{
|
||||||
|
$this->calendarevents[] = $calendarevent;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove calendarevent
|
||||||
|
*
|
||||||
|
* @param \Cadoles\PortalBundle\Entity\Calendarevent $calendarevent
|
||||||
|
*/
|
||||||
|
public function removeCalendarevent(\Cadoles\PortalBundle\Entity\Calendarevent $calendarevent)
|
||||||
|
{
|
||||||
|
$this->calendarevents->removeElement($calendarevent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get calendarevents
|
||||||
|
*
|
||||||
|
* @return \Doctrine\Common\Collections\Collection
|
||||||
|
*/
|
||||||
|
public function getCalendarevents()
|
||||||
|
{
|
||||||
|
return $this->calendarevents;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,11 @@ class User implements UserInterface, \Serializable
|
||||||
*/
|
*/
|
||||||
protected $messagereaders;
|
protected $messagereaders;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToMany(targetEntity="Cadoles\WebsocketBundle\Entity\Message", mappedBy="sees")
|
||||||
|
*/
|
||||||
|
protected $messagesees;
|
||||||
|
|
||||||
//== CODE A NE PAS REGENERER
|
//== CODE A NE PAS REGENERER
|
||||||
/**
|
/**
|
||||||
* @ORM\PostLoad
|
* @ORM\PostLoad
|
||||||
|
@ -1421,4 +1425,38 @@ class User implements UserInterface, \Serializable
|
||||||
{
|
{
|
||||||
return $this->messagereaders;
|
return $this->messagereaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add messagesee
|
||||||
|
*
|
||||||
|
* @param \Cadoles\WebsocketBundle\Entity\Message $messagesee
|
||||||
|
*
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
|
public function addMessagesee(\Cadoles\WebsocketBundle\Entity\Message $messagesee)
|
||||||
|
{
|
||||||
|
$this->messagesees[] = $messagesee;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove messagesee
|
||||||
|
*
|
||||||
|
* @param \Cadoles\WebsocketBundle\Entity\Message $messagesee
|
||||||
|
*/
|
||||||
|
public function removeMessagesee(\Cadoles\WebsocketBundle\Entity\Message $messagesee)
|
||||||
|
{
|
||||||
|
$this->messagesees->removeElement($messagesee);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get messagesees
|
||||||
|
*
|
||||||
|
* @return \Doctrine\Common\Collections\Collection
|
||||||
|
*/
|
||||||
|
public function getMessagesees()
|
||||||
|
{
|
||||||
|
return $this->messagesees;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -591,7 +591,6 @@ a.item-heart {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height:40px;
|
height:40px;
|
||||||
width:40px;
|
width:40px;
|
||||||
border-radius: 100%;
|
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 115 KiB |
|
@ -1,12 +1,12 @@
|
||||||
{% set logo = "transnum-logo.png" %}
|
{% set logo = "transnum-logo.png" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
{% set fgheader = "" %}
|
||||||
{% set header = "transnum-header.jpg" %}
|
{% set header = "transnum-header.png" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
{% set colormain = "2176ad" %}
|
{% set colormain = "2176ad" %}
|
||||||
{% set fontcolorhover = "" %}
|
{% set fontcolorhover = "" %}
|
||||||
{% set colorbody = "" %}
|
{% set colorbody = "eeeeee" %}
|
||||||
|
|
||||||
{% set fontfacetitle = "LexendDeca-Regular" %}
|
{% set fontfacetitle = "LexendDeca-Regular" %}
|
||||||
{% set fontfacebody = "" %}
|
{% set fontfacebody = "" %}
|
||||||
|
|
|
@ -3,7 +3,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #2e3339 !important;
|
||||||
|
}
|
||||||
|
body.simple {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.navbar-default,.sidebar ul li {
|
||||||
|
background-color: #2e3339 !important;
|
||||||
|
border-color: #2e3339 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,6 +59,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.widget-notbordered .widgetheader {
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-notbordered .widgetbody .list-item, .widget-notbordered .widgetbody .grid-item-content {
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.grid .grid-preview {
|
.grid .grid-preview {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -159,7 +159,7 @@
|
||||||
<h3>Mes Icônes</h3>
|
<h3>Mes Icônes</h3>
|
||||||
{% for icon in iconsuser %}
|
{% for icon in iconsuser %}
|
||||||
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
|
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
|
||||||
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
|
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for icon in icons %}
|
{% for icon in icons %}
|
||||||
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
|
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
|
||||||
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
|
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -156,8 +156,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for group in user.groups %}
|
{% for group in user.groups %}
|
||||||
<tr id="linkgroup{{ group.group.id }}">
|
<tr id="linkgroup{{ group.group.id }}">
|
||||||
{% if (access=="config" or group.group.fgopen or group.group.fgcanshare) and group.group.owner!=app.user and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %}
|
{% if access=="config" and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %}
|
||||||
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
|
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
|
||||||
|
{% elseif (group.group.fgopen or group.group.fgcanshare) and group.group.owner!=app.user and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %}
|
||||||
|
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -733,6 +733,25 @@ class InitDataCommand extends ContainerAwareCommand
|
||||||
$entityWidget->setParameter($parameter);
|
$entityWidget->setParameter($parameter);
|
||||||
$em->persist($entityWidget);
|
$em->persist($entityWidget);
|
||||||
|
|
||||||
|
// Actualités des groupes
|
||||||
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1820);
|
||||||
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_megaphone2.png"]);
|
||||||
|
$entityWidget->setId(-1820);
|
||||||
|
$entityWidget->setRoworder(2);
|
||||||
|
$entityWidget->setIcon($entityicon);
|
||||||
|
$entityWidget->setName('Actualités de mes Groupes');
|
||||||
|
$entityWidget->setDescription("Affiche la liste actualités de vos groupes de travail");
|
||||||
|
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_groupmessage");
|
||||||
|
$entityWidget->setHeight("630");
|
||||||
|
$entityWidget->setAutoajust(true);
|
||||||
|
$entityWidget->setBorder(false);
|
||||||
|
$entityWidget->setOpened(true);
|
||||||
|
$entityWidget->setAccess(["config","user","group"]);
|
||||||
|
$parameter = json_decode('{"fields": [{"id": "nbarticle", "loc": "col1", "type": "integer", "label": "Nombre d\'actualitées affichées (0 pour tout)", "value": "5", "mandatory": "true"},{"id": "modelist", "loc": "col1", "type": "modelist", "label": "Mode Affichage", "value": "1", "mandatory": "true"}]}');
|
||||||
|
$entityWidget->setParameter($parameter);
|
||||||
|
$em->persist($entityWidget);
|
||||||
|
|
||||||
// Widget Séparateur
|
// Widget Séparateur
|
||||||
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1600);
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1600);
|
||||||
if(!$entityWidget) $entityWidget = new Widget();
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
|
|
|
@ -1878,6 +1878,7 @@ class PagewidgetController extends Controller
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($group);
|
$group=$em->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
if($group) {
|
if($group) {
|
||||||
$title=$group->getLabel();
|
$title=$group->getLabel();
|
||||||
|
$id=$group->getId();
|
||||||
if($group->getDescription())
|
if($group->getDescription())
|
||||||
$description="<strong>Description</strong><br>".$group->getDescription();
|
$description="<strong>Description</strong><br>".$group->getDescription();
|
||||||
if($group->getIcon())
|
if($group->getIcon())
|
||||||
|
@ -1893,6 +1894,7 @@ class PagewidgetController extends Controller
|
||||||
else {
|
else {
|
||||||
$title=$entity->getPage()->getName();
|
$title=$entity->getPage()->getName();
|
||||||
$proprio=$entity->getPage()->getUser();
|
$proprio=$entity->getPage()->getUser();
|
||||||
|
$id=0;
|
||||||
if($proprio) {
|
if($proprio) {
|
||||||
$description="Propriétaire de la page<br>".$proprio->getLastname()." ".$proprio->getLastname();
|
$description="Propriétaire de la page<br>".$proprio->getLastname()." ".$proprio->getLastname();
|
||||||
$icon="/uploads/avatar/".$proprio->getAvatar();
|
$icon="/uploads/avatar/".$proprio->getAvatar();
|
||||||
|
@ -1907,7 +1909,8 @@ class PagewidgetController extends Controller
|
||||||
'icon' => $icon,
|
'icon' => $icon,
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
'members' => $members
|
'members' => $members,
|
||||||
|
'id' => $id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1992,5 +1995,83 @@ class PagewidgetController extends Controller
|
||||||
'groups' => $mygroups,
|
'groups' => $mygroups,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
||||||
|
$usage=$request->query->get('usage');
|
||||||
|
$group=$request->query->get('group');
|
||||||
|
$user=$this->getUser();
|
||||||
|
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
|
||||||
|
// Permissions
|
||||||
|
if($access=="config") {
|
||||||
|
$canupdate = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
|
$page=$entity->getPage();
|
||||||
|
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
||||||
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Récupération des paramétres du widget
|
||||||
|
$modelist=1;
|
||||||
|
$nbarticle=5;
|
||||||
|
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||||
|
switch($parameter["id"]) {
|
||||||
|
case "modelist":
|
||||||
|
$modelist=$parameter["value"];
|
||||||
|
break;
|
||||||
|
case "nbarticle":
|
||||||
|
$nbarticle=$parameter["value"];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$mygroups=[];
|
||||||
|
$mymsg= [];
|
||||||
|
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
|
||||||
|
foreach($groupsshared as $groupshared) {
|
||||||
|
// On récupère l'ensemble des messages du groupes
|
||||||
|
$messages=$this->getDoctrine()->getRepository("CadolesWebsocketBundle:Message")->findBy(["group"=>$groupshared]);
|
||||||
|
foreach($messages as $key => $message) {
|
||||||
|
// persistante collection à revoir
|
||||||
|
if($message->getSees()->count()>0) {
|
||||||
|
if($message->getSees()->contains($user) ) {
|
||||||
|
|
||||||
|
unset($messages[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($messages as $key => $message) {
|
||||||
|
$tmp=["id" => $message->getId(), "user" => $message->getUser(), "date"=>$message->getSubmitdate(), "topic"=>$message->getTopic()];
|
||||||
|
array_push($mymsg,$tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$ord = array();
|
||||||
|
foreach ($mymsg as $key => $value){
|
||||||
|
$ord[] = $value['date'];
|
||||||
|
}
|
||||||
|
array_multisort($ord, SORT_DESC, $mymsg);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
return $this->render($this->labelentity.':viewgroupmessage.html.twig', [
|
||||||
|
'entity' => $entity,
|
||||||
|
'canadd' => ($user),
|
||||||
|
'canupdate' => $canupdate,
|
||||||
|
'usage' => $usage,
|
||||||
|
'modelist' => $modelist,
|
||||||
|
'messages' => $mymsg,
|
||||||
|
'nbarticle' => $nbarticle,
|
||||||
|
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -771,6 +771,10 @@ cadoles_portal_config_panelwidget_view_group:
|
||||||
path: /config/pagewidget/view/group/{id}
|
path: /config/pagewidget/view/group/{id}
|
||||||
defaults: { _controller: CadolesPortalBundle:Pagewidget:viewgroup, access: config }
|
defaults: { _controller: CadolesPortalBundle:Pagewidget:viewgroup, access: config }
|
||||||
|
|
||||||
|
cadoles_portal_config_panelwidget_view_groupmessage:
|
||||||
|
path: /config/pagewidget/view/groupmessage/{id}
|
||||||
|
defaults: { _controller: CadolesPortalBundle:Pagewidget:viewgroupmessage, access: config }
|
||||||
|
|
||||||
#-- Access user
|
#-- Access user
|
||||||
cadoles_portal_user_pagewidget_widget_sumbit:
|
cadoles_portal_user_pagewidget_widget_sumbit:
|
||||||
path: /user/pagewidget/submit/{idpage}/{idwidgettype}
|
path: /user/pagewidget/submit/{idpage}/{idwidgettype}
|
||||||
|
@ -876,3 +880,7 @@ cadoles_portal_user_panelwidget_view_group:
|
||||||
path: /pagewidget/view/group/{id}
|
path: /pagewidget/view/group/{id}
|
||||||
defaults: { _controller: CadolesPortalBundle:Pagewidget:viewgroup, access: user }
|
defaults: { _controller: CadolesPortalBundle:Pagewidget:viewgroup, access: user }
|
||||||
|
|
||||||
|
cadoles_portal_user_panelwidget_view_groupmessage:
|
||||||
|
path: /pagewidget/view/groupmessage/{id}
|
||||||
|
defaults: { _controller: CadolesPortalBundle:Pagewidget:viewgroupmessage, access: user }
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% for icon in icons %}
|
{% for icon in icons %}
|
||||||
<a href="#" onClick="selIcon({{ icon.id }})">
|
<a href="#" onClick="selIcon({{ icon.id }})">
|
||||||
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
|
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div style="width:90px; margin:10px auto;">
|
<div style="width:90px; margin:10px auto;">
|
||||||
<img id="icon_label_img" src="/{{ alias }}/{{ icon.label }}" style="width:90px;height:auto;margin:auto;display:block;margin-bottom:5px;">
|
<img id="icon_label_img" src="/{{ alias }}/{{ icon.label }}" style="width:90px;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: #{{color["main"]}}">
|
||||||
{{ form_widget(form.label) }}
|
{{ form_widget(form.label) }}
|
||||||
<a class="btn btn-info" style="width:90px" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Icône','{{ path('cadoles_portal_config_icon_icon') }}');" title='Ajouter un Logo'>Modifier</a>
|
<a class="btn btn-info" style="width:90px" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Icône','{{ path('cadoles_portal_config_icon_icon') }}');" title='Ajouter un Logo'>Modifier</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for icon in icons %}
|
{% for icon in icons %}
|
||||||
<a href="{{ path('cadoles_portal_'~access~'_icon_update', {id : icon.id}) }}"><img class="icon" height="90" src="/{{ alias }}/{{ icon.label }}" style="padding:10px"></a>
|
<a href="{{ path('cadoles_portal_'~access~'_icon_update', {id : icon.id}) }}"><img class="icon" height="90" src="/{{ alias }}/{{ icon.label }}" style="padding:10px; margin-bottom:2px; background-color: #{{color["main"]}}"></a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% for icon in icons %}
|
{% for icon in icons %}
|
||||||
<a href="#" onClick="selIcon({{ icon.id }})">
|
<a href="#" onClick="selIcon({{ icon.id }})">
|
||||||
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
|
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px;; margin-bottom:2px; background-color: #{{ color["main"]}}">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -531,4 +531,25 @@
|
||||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||||
var grid = $('.grid').masonry(optiongrid);
|
var grid = $('.grid').masonry(optiongrid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Place un message en leur
|
||||||
|
function hideMessage(id) {
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: "{{ path('cadoles_websocket_message_see') }}",
|
||||||
|
data: {
|
||||||
|
id:id
|
||||||
|
},
|
||||||
|
success: function() {
|
||||||
|
$(".msg-"+id).remove();
|
||||||
|
var ele = $(".msg-hidden").first();
|
||||||
|
ele.show();
|
||||||
|
ele.removeClass("msg-hidden");
|
||||||
|
|
||||||
|
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||||
|
var grid = $('.grid').masonry(optiongrid);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<div id="diviconsel" class="col-md-12 text-left" style="height:140px; padding:20px; text-align:center; background-color: {{ entity.colorheaderback ? entity.colorheaderback : '#000000' }};">
|
<div id="diviconsel" class="col-md-12 text-left" style="height:140px; padding:20px; text-align:center; background-color: #{{ color["main"] }};">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" height="100" />
|
<img src="/{{ alias }}/{{ entity.icon.label }}" height="100" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
<h3>Mes Icônes</h3>
|
<h3>Mes Icônes</h3>
|
||||||
{% for icon in iconsuser %}
|
{% for icon in iconsuser %}
|
||||||
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
|
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
|
||||||
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
|
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
|
|
||||||
{% for icon in icons %}
|
{% for icon in icons %}
|
||||||
<a href="#" onClick="selIcon({{ icon.id }})">
|
<a href="#" onClick="selIcon({{ icon.id }})">
|
||||||
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
|
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
|
|
||||||
{% if canupdate or alerts|length>0 %}
|
{% if canupdate or alerts|length>0 %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%} widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
@ -48,11 +48,16 @@
|
||||||
<span class="title">{{ entity.name }}</span>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if files|length >= 1 %}
|
{% if files|length >= 1 or canupdate %}
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
<div class="grid clearfix">
|
<div class="grid clearfix">
|
||||||
|
{% if canupdate %}
|
||||||
|
<div class="grid-sizer grid-small"></div>
|
||||||
|
<div class="grid-gutter-sizer"></div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for file in files|sort %}
|
{% for file in files|sort %}
|
||||||
{% if loop.index==1 %}
|
{% if loop.index==1 and not canupdate%}
|
||||||
<div class="grid-sizer grid-small"></div>
|
<div class="grid-sizer grid-small"></div>
|
||||||
<div class="grid-gutter-sizer"></div>
|
<div class="grid-gutter-sizer"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
{% set stylegrid="grid-list" %}
|
{% set stylegrid="grid-list" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{% set canadd = true %}
|
{% set canadd = true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%} widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
{% set theme = app.session.get('theme') %}
|
||||||
|
{% if theme is not empty %}
|
||||||
|
{{ include('@Theme/'~theme~'/function.html.twig') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
|
||||||
|
|
||||||
|
{% set stylewidget = constants.mystylewidget(entity) %}
|
||||||
|
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
|
||||||
|
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||||
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
|
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
|
||||||
|
{% set color = app.session.get('color') %}
|
||||||
|
|
||||||
|
{% set colorbodyfont = entity.colorbodyfont %}
|
||||||
|
{% if colorbodyfont is null %}
|
||||||
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set colorbodyback = entity.colorbodyback %}
|
||||||
|
{% if colorbodyback is null %}
|
||||||
|
{% set colorbodyback = color['main'] %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set colorbodyfont = entity.colorbodyfont %}
|
||||||
|
{% if colorbodyfont is null %}
|
||||||
|
{% if colorbodyback==color['fontcolorhover'] %}
|
||||||
|
{% set colorbodyfont = color['main'] %}
|
||||||
|
{% else %}
|
||||||
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if modelist==0 %}
|
||||||
|
{% set stylegrid="grid-preview" %}
|
||||||
|
{% elseif modelist==1 %}
|
||||||
|
{% set stylegrid="grid-list" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
|
{% if canupdate %}
|
||||||
|
<div class="widgetmenu">
|
||||||
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
<i class="fa fa-file fa-fw" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
|
{% endif %}
|
||||||
|
<span class="title">{{ entity.name }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% set firstflux="" %}
|
||||||
|
|
||||||
|
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||||
|
{% if fluxs is defined %}
|
||||||
|
{% if fluxs|length > 1 %}
|
||||||
|
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
|
||||||
|
|
||||||
|
{% for flux in fluxs %}
|
||||||
|
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %}
|
||||||
|
{% if flux.color is not null %}
|
||||||
|
{% set stylefeed = "background-color: #" ~ flux.color ~ ";" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},{{ flux.id }})" style="{{ stylefeed }} color:#{{ color['fontcolorhover'] }};">{{ flux.title }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="grid clearfix">
|
||||||
|
<div class="grid-sizer {{stylegrid}}"></div>
|
||||||
|
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
||||||
|
{% set nbaff=0 %}
|
||||||
|
{% for message in messages %}
|
||||||
|
{% set nbaff=nbaff+1 %}
|
||||||
|
{% set class="" %}
|
||||||
|
{% set style="" %}
|
||||||
|
{% if nbaff > nbarticle %}
|
||||||
|
{% set class="msg-hidden" %}
|
||||||
|
{% set style="display:none" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};">
|
||||||
|
<div class="grid-item-content">
|
||||||
|
<div class="item-link clearfix">
|
||||||
|
<div class="grid-item-logo">
|
||||||
|
<img class="grid-item-img avatar" src="/{{alias}}/uploads/avatar/{{message.user.avatar}}" width="100%">
|
||||||
|
<a onClick="hideMessage({{message.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="caption">
|
||||||
|
<div class="grid-item-title" style="position:inherit">
|
||||||
|
{{message.user.lastname}} {{message.user.firstname}}<br>
|
||||||
|
<small>{{message.date|date('d/m/Y H:i')}}</small><br><br>
|
||||||
|
{{ message.topic | raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% set canadd = false %}
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
{%if usage=="group" %}<small>Groupe<br></small>{% endif %}
|
{%if usage=="group" %}<small>Groupe<br></small>{% endif %}
|
||||||
|
@ -55,13 +56,34 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-item-title">
|
<div class="grid-item-title">
|
||||||
{%if member.fgmanager%}<i style="color: #FFF" class="fa fa-star" title="Manager"></i>{%endif%}<br>
|
{%if member.fgmanager%}
|
||||||
|
<i style="color: #FFF" class="fa fa-star" title="Manager"></i>
|
||||||
|
{% if member.user==app.user %}
|
||||||
|
{% set canadd=true %}
|
||||||
|
{% endif %}
|
||||||
|
{%endif%}<br>
|
||||||
{{ member.user.lastname }} {{ member.user.firstname }}
|
{{ member.user.lastname }} {{ member.user.firstname }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if canadd==true %}
|
||||||
|
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
|
||||||
|
<a href="{{path('cadoles_core_user_group_users',{'id':id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||||
|
<div class="grid-item-content">
|
||||||
|
<div class="grid-item-logo">
|
||||||
|
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="grid-item-title">
|
||||||
|
Ajouter un membre
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{% set colorbodyfont = color['main'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] ~ ";" %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] ~ ";" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
|
{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
|
||||||
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
|
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
|
|
@ -80,4 +80,29 @@ class ChatController extends Controller
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function seeAction(Request $request)
|
||||||
|
{
|
||||||
|
// S'assurer que c'est un appel ajax
|
||||||
|
if (!$request->isXmlHttpRequest()) {
|
||||||
|
return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
$output=array();
|
||||||
|
$id=$request->request->get('id');
|
||||||
|
$user=$this->getUser();
|
||||||
|
if($user) {
|
||||||
|
$message=$em->getRepository("CadolesWebsocketBundle:Message")->find($id);
|
||||||
|
$message->addSee($user);
|
||||||
|
// Sauvegarde
|
||||||
|
$em->persist($message);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = new Response(json_encode($output));
|
||||||
|
$response->headers->set('Content-Type', 'application/json');
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,15 +42,23 @@ class Message
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(targetEntity="Cadoles\CoreBundle\Entity\User", inversedBy="messagereaders", cascade={"persist"})
|
* @ORM\ManyToMany(targetEntity="Cadoles\CoreBundle\Entity\User", inversedBy="messagereaders", cascade={"persist"})
|
||||||
* @ORM\JoinTable(name="messageuser",
|
* @ORM\JoinTable(name="messageuserread",
|
||||||
* joinColumns={@ORM\JoinColumn(name="message", referencedColumnName="id")},
|
* joinColumns={@ORM\JoinColumn(name="message", referencedColumnName="id")},
|
||||||
* inverseJoinColumns={@ORM\JoinColumn(name="user", referencedColumnName="id")}
|
* inverseJoinColumns={@ORM\JoinColumn(name="user", referencedColumnName="id")}
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
protected $readers;
|
protected $readers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToMany(targetEntity="Cadoles\CoreBundle\Entity\User", inversedBy="messagesees", cascade={"persist"})
|
||||||
|
* @ORM\JoinTable(name="messageusersee",
|
||||||
|
* joinColumns={@ORM\JoinColumn(name="message", referencedColumnName="id")},
|
||||||
|
* inverseJoinColumns={@ORM\JoinColumn(name="user", referencedColumnName="id")}
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
protected $sees;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -200,4 +208,38 @@ class Message
|
||||||
{
|
{
|
||||||
return $this->readers;
|
return $this->readers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add see
|
||||||
|
*
|
||||||
|
* @param \Cadoles\CoreBundle\Entity\User $see
|
||||||
|
*
|
||||||
|
* @return Message
|
||||||
|
*/
|
||||||
|
public function addSee(\Cadoles\CoreBundle\Entity\User $see)
|
||||||
|
{
|
||||||
|
$this->sees[] = $see;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove see
|
||||||
|
*
|
||||||
|
* @param \Cadoles\CoreBundle\Entity\User $see
|
||||||
|
*/
|
||||||
|
public function removeSee(\Cadoles\CoreBundle\Entity\User $see)
|
||||||
|
{
|
||||||
|
$this->sees->removeElement($see);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get sees
|
||||||
|
*
|
||||||
|
* @return \Doctrine\Common\Collections\Collection
|
||||||
|
*/
|
||||||
|
public function getSees()
|
||||||
|
{
|
||||||
|
return $this->sees;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
cadoles_websocket_chat:
|
cadoles_websocket_chat:
|
||||||
path: /websocket/chat/{id}
|
path: /websocket/chat/{id}
|
||||||
defaults: { _controller: CadolesWebsocketBundle:Chat:client }
|
defaults: { _controller: CadolesWebsocketBundle:Chat:client }
|
||||||
|
|
||||||
|
cadoles_websocket_message_see:
|
||||||
|
path: /user/message/see
|
||||||
|
defaults: { _controller: CadolesWebsocketBundle:Chat:see }
|
|
@ -118,27 +118,31 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block localjavascript %}
|
{% block localjavascript %}
|
||||||
|
var webSocket;
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
if (CKEDITOR.instances["chat_message"]) CKEDITOR.instances["chat_message"].destroy();
|
if (CKEDITOR.instances["chat_message"]) CKEDITOR.instances["chat_message"].destroy();
|
||||||
if (CKEDITOR.instances["chat_messagemail"]) CKEDITOR.instances["chat_messagemail"].destroy();
|
if (CKEDITOR.instances["chat_messagemail"]) CKEDITOR.instances["chat_messagemail"].destroy();
|
||||||
|
|
||||||
CKEDITOR.replace( 'chat_message', {
|
setTimeout(function(){
|
||||||
toolbar: [
|
CKEDITOR.replace( 'chat_message', {
|
||||||
{ name: 'custo01', items: [ 'Bold','Italic','Underline','RemoveFormat' ] },
|
toolbar: [
|
||||||
{ name: 'custo02', items: [ 'NumberedList','BulletedList' ] },
|
{ name: 'custo01', items: [ 'Bold','Italic','Underline','RemoveFormat' ] },
|
||||||
{ name: 'custo03', items: [ 'Smiley','Link','Unlink' ]}
|
{ name: 'custo02', items: [ 'NumberedList','BulletedList' ] },
|
||||||
],
|
{ name: 'custo03', items: [ 'Smiley','Link','Unlink' ]}
|
||||||
height: 100
|
],
|
||||||
});
|
height: 100
|
||||||
|
});
|
||||||
|
|
||||||
CKEDITOR.replace( 'chat_messagemail', {
|
CKEDITOR.replace( 'chat_messagemail', {
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{ name: 'custo01', items: [ 'Bold','Italic','Underline','RemoveFormat' ] },
|
{ name: 'custo01', items: [ 'Bold','Italic','Underline','RemoveFormat' ] },
|
||||||
{ name: 'custo02', items: [ 'NumberedList','BulletedList' ] },
|
{ name: 'custo02', items: [ 'NumberedList','BulletedList' ] },
|
||||||
{ name: 'custo03', items: [ 'Smiley','Link','Unlink' ]}
|
{ name: 'custo03', items: [ 'Smiley','Link','Unlink' ]}
|
||||||
],
|
],
|
||||||
height: 150
|
height: 150
|
||||||
});
|
});
|
||||||
|
},500);
|
||||||
|
|
||||||
$(".switch").bootstrapSwitch();
|
$(".switch").bootstrapSwitch();
|
||||||
var dateoptions = {weekday: "long", year: "numeric", month: "long", day: "numeric", hour: "2-digit", minute: "2-digit" };
|
var dateoptions = {weekday: "long", year: "numeric", month: "long", day: "numeric", hour: "2-digit", minute: "2-digit" };
|
||||||
|
@ -146,7 +150,7 @@
|
||||||
|
|
||||||
{% if websocket_activate and app.user %}
|
{% if websocket_activate and app.user %}
|
||||||
var _WS_URI = "wss://{{ gos_web_socket_server_host }}:{{ gos_web_socket_server_port }}";
|
var _WS_URI = "wss://{{ gos_web_socket_server_host }}:{{ gos_web_socket_server_port }}";
|
||||||
var webSocket = WS.connect(_WS_URI);
|
webSocket = WS.connect(_WS_URI);
|
||||||
var timer;
|
var timer;
|
||||||
|
|
||||||
webSocket.on("socket/connect", function (session) {
|
webSocket.on("socket/connect", function (session) {
|
||||||
|
@ -228,12 +232,13 @@
|
||||||
session.publish("websocket/channel/{{groupid}}", event);
|
session.publish("websocket/channel/{{groupid}}", event);
|
||||||
CKEDITOR.instances["chat_message"].setData('');
|
CKEDITOR.instances["chat_message"].setData('');
|
||||||
|
|
||||||
|
/* Ne plus envoyer d'event compteur on passe par de l'ajax
|
||||||
event={type: "add", group:{{groupid}}};
|
event={type: "add", group:{{groupid}}};
|
||||||
parent.parent.counter(event);
|
parent.parent.counter(event);
|
||||||
|
*/
|
||||||
|
|
||||||
$("#sendbymail").bootstrapSwitch('state',false);
|
$("#sendbymail").bootstrapSwitch('state',false);
|
||||||
|
|
||||||
$('#mymodal-sendmail').modal('hide');
|
$('#mymodal-sendmail').modal('hide');
|
||||||
|
|
||||||
}
|
}
|
||||||
else alert("Sujet, corps et destinataire(s) obligatoire");
|
else alert("Sujet, corps et destinataire(s) obligatoire");
|
||||||
});
|
});
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue