Compare commits
No commits in common. "6ad1eb556955b7c8c2d10a10fdbec748e3a47a15" and "9cbcdd28b94d8ef708b1e6670be5eb78f24d0cb7" have entirely different histories.
6ad1eb5569
...
9cbcdd28b9
|
@ -8,8 +8,9 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
|
|||
(-100, 'Interne', 'SIREN');
|
||||
|
||||
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}YAgr/O4uRUcWbNTTnUPNUYGt9TyvjbjJ
|
||||
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||
(-100, -100, 'admin', 'Administrateur', 'Cadoles', '{SSHA}mjxx1N7FQauOJjM/wcrdc9MuhhBffobd
|
||||
', 'admin@eole27.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', 'SIREN', 'simple');
|
||||
|
||||
|
||||
|
||||
TRUNCATE TABLE sidebar;
|
||||
|
|
|
@ -57,8 +57,6 @@ class CoreController extends Controller
|
|||
if($user) {
|
||||
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
|
||||
if(! $notices->isEmpty()) {
|
||||
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeUser($user,false);
|
||||
|
||||
return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
|
|
|
@ -565,7 +565,7 @@ class GroupController extends Controller
|
|||
|
||||
// Notification mail auprès des managers
|
||||
if($group->getFgcanshare()) {
|
||||
$text=$user->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
||||
$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(),
|
||||
|
@ -608,7 +608,7 @@ class GroupController extends Controller
|
|||
|
||||
// Notification mail auprès des managers
|
||||
if($group->getFgcanshare()) {
|
||||
$text=$user->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
||||
$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(),
|
||||
|
@ -662,7 +662,7 @@ class GroupController extends Controller
|
|||
|
||||
// Permission
|
||||
$permgroup=$this->get('session')->get('permgroup');
|
||||
if($access=="user") {
|
||||
if($access="user") {
|
||||
if($permgroup=="NO_BODY") throw $this->createNotFoundException('Permission denied');
|
||||
if($permgroup=="ROLE_ANIM" && $this->isGranted('ROLE_USER')) throw $this->createNotFoundException('Permission denied');
|
||||
}
|
||||
|
|
|
@ -564,7 +564,7 @@ class UserController extends Controller
|
|||
|
||||
// Notification mail auprès des managers
|
||||
if($group->getFgcanshare()) {
|
||||
$text=$data->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
||||
$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(),
|
||||
|
|
|
@ -204,9 +204,9 @@ span.item-drag {
|
|||
|
||||
.grid {
|
||||
list-style-type: none;
|
||||
margin: 0 auto;
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
/*width: 100%;*/
|
||||
width: 100%;
|
||||
min-height: 30px;
|
||||
background: transparent;
|
||||
}
|
||||
|
@ -232,10 +232,6 @@ span.item-drag {
|
|||
display: block;
|
||||
}
|
||||
|
||||
.grid-item .grid-item-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.grid-item .grid-item-content:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
|
|
@ -1980,12 +1980,11 @@ class PagewidgetController extends Controller
|
|||
|
||||
$title=$groupshared->getLabel();
|
||||
$idpage=$groupshared->pagesshared[0]->getId();
|
||||
$color=$groupshared->getColor();
|
||||
$icon=null;
|
||||
if($groupshared->getIcon())
|
||||
$icon="/".$groupshared->getIcon()->getLabel();
|
||||
|
||||
array_push($mygroups,["title"=>$title,"icon"=>$icon,"id"=>$idpage,"color"=>$color]);
|
||||
array_push($mygroups,["title"=>$title,"icon"=>$icon,"id"=>$idpage]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2039,11 +2038,6 @@ class PagewidgetController extends Controller
|
|||
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
|
||||
if(is_array($groupsshared)) {
|
||||
foreach($groupsshared as $groupshared) {
|
||||
// On récupère les info du groupe
|
||||
$title=$groupshared->getLabel();
|
||||
$idpage=$groupshared->pagesshared[0]->getId();
|
||||
$color=$groupshared->getColor();
|
||||
|
||||
// On récupère l'ensemble des messages du groupes
|
||||
$messages=$this->getDoctrine()->getRepository("CadolesWebsocketBundle:Message")->findBy(["group"=>$groupshared]);
|
||||
foreach($messages as $key => $message) {
|
||||
|
@ -2057,7 +2051,7 @@ class PagewidgetController extends Controller
|
|||
}
|
||||
|
||||
foreach($messages as $key => $message) {
|
||||
$tmp=["id" => $message->getId(), "user" => $message->getUser(), "date"=>$message->getSubmitdate(), "topic"=>$message->getTopic(), "pageid" => $idpage, "pagetitle" => $title, "color" => $color];
|
||||
$tmp=["id" => $message->getId(), "user" => $message->getUser(), "date"=>$message->getSubmitdate(), "topic"=>$message->getTopic()];
|
||||
array_push($mymsg,$tmp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,8 +80,6 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'};
|
||||
|
||||
$('document').ready(function(){
|
||||
// Ajustement des frames
|
||||
$(window).resize(function() {
|
||||
|
@ -194,6 +192,7 @@
|
|||
$(".colcontainer .col").css("padding-bottom","");
|
||||
|
||||
// Création des grilles d'items
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
},
|
||||
update: updateLocalisation
|
||||
|
@ -202,6 +201,7 @@
|
|||
|
||||
|
||||
// Création des grilles d'items
|
||||
var optiongrid={columnWidth: '.grid-sizer', itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'};
|
||||
$('body').imagesLoaded(function() {
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
});
|
||||
|
@ -285,6 +285,7 @@
|
|||
widget.children(".widgetbody" ).toggle();
|
||||
|
||||
// On recalcule les grilles
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
|
@ -459,6 +460,7 @@
|
|||
$(".widget[data-id="+idwidget+"]").find(".flux-"+id).show();
|
||||
}
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
|
@ -494,6 +496,7 @@
|
|||
}
|
||||
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
|
@ -525,6 +528,7 @@
|
|||
}
|
||||
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
|
@ -542,6 +546,7 @@
|
|||
ele.show();
|
||||
ele.removeClass("msg-hidden");
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
|
||||
|
||||
{% set colormain = constants.mycolormain() %}
|
||||
{% set stylewidget = constants.mystylewidget(entity) %}
|
||||
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
|
||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||
|
@ -53,7 +52,7 @@
|
|||
{% for group in groups %}
|
||||
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
|
||||
<a href="{{path('cadoles_core_home',{id:group.id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content" style="background-color:{{ group.color ? "#"~group.color : '#'~colormain }}">
|
||||
<div class="grid-item-content">
|
||||
<div class="grid-item-logo">
|
||||
{% if group.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}{{ group.icon }}" />
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
|
||||
|
||||
{% set colormain = constants.mycolormain() %}
|
||||
{% set stylewidget = constants.mystylewidget(entity) %}
|
||||
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
|
||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||
|
@ -73,7 +72,7 @@
|
|||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};">
|
||||
<div class="grid-item-content" style="background-color:{{ message.color ? "#"~message.color : '#'~colormain }}">
|
||||
<div class="grid-item-content">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img style='cursor:pointer' onClick="seeUser({{message.user.id}})" class="grid-item-img avatar" src="/{{alias}}/uploads/avatar/{{message.user.avatar}}" width="100%">
|
||||
|
@ -83,7 +82,7 @@
|
|||
<div class="caption">
|
||||
<div class="grid-item-title" style="position:inherit; width:85%">
|
||||
{{message.user.lastname}} {{message.user.firstname}}<br>
|
||||
<small>{{message.date|date('d/m/Y H:i')}} dans le groupe <u><a href="{{path('cadoles_core_home',{id:message.pageid})}}" target="_top">{{ message.pagetitle }}</a></u></small><br><br>
|
||||
<small>{{message.date|date('d/m/Y H:i')}}</small><br><br>
|
||||
{{ message.topic | raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -54,43 +54,42 @@ class CountMessageCommand extends Command
|
|||
foreach($user->getGroups() as $usergroup) {
|
||||
// On calcule le nombre de message non lu pour l'utilisateur'
|
||||
$group=$usergroup->getGroup();
|
||||
if($group->getFgcanshare()) {
|
||||
$qb = $this->em->createQueryBuilder();
|
||||
$tm = $qb ->select($qb->expr()->count('m.id'))
|
||||
->from('CadolesWebsocketBundle:Message', 'm')
|
||||
->where('m.group = :group')
|
||||
->andWhere('m.user != :user')
|
||||
->setParameter('group', $group)
|
||||
->setParameter('user', $user)
|
||||
->getQuery()->getSingleScalarResult();
|
||||
$qb = $this->em->createQueryBuilder();
|
||||
$tm = $qb ->select($qb->expr()->count('m.id'))
|
||||
->from('CadolesWebsocketBundle:Message', 'm')
|
||||
->where('m.group = :group')
|
||||
->andWhere('m.user != :user')
|
||||
->setParameter('group', $group)
|
||||
->setParameter('user', $user)
|
||||
->getQuery()->getSingleScalarResult();
|
||||
|
||||
$qb = $this->em->createQueryBuilder();
|
||||
$tr = $qb ->select($qb->expr()->count('m.id'))
|
||||
->from('CadolesWebsocketBundle:Message', 'm')
|
||||
->where('m.group = :group')
|
||||
->andWhere('m.user != :user')
|
||||
->andWhere(':user MEMBER OF m.readers')
|
||||
->setParameter('group', $group)
|
||||
->setParameter('user', $user)
|
||||
->getQuery()->getSingleScalarResult();
|
||||
$qb = $this->em->createQueryBuilder();
|
||||
$tr = $qb ->select($qb->expr()->count('m.id'))
|
||||
->from('CadolesWebsocketBundle:Message', 'm')
|
||||
->where('m.group = :group')
|
||||
->andWhere('m.user != :user')
|
||||
->andWhere(':user MEMBER OF m.readers')
|
||||
->setParameter('group', $group)
|
||||
->setParameter('user', $user)
|
||||
->getQuery()->getSingleScalarResult();
|
||||
|
||||
if($tm-$tr>0) $cptnotread+=($tm-$tr);
|
||||
}
|
||||
if($cptnotread>0) {
|
||||
$this->writeln($user->getUsername()." notifié de ".$cptnotread." messages non lus");
|
||||
|
||||
$template="template";
|
||||
|
||||
$mail_params=array(
|
||||
"subject" => $this->appname." : Messages non lus",
|
||||
"body_html"=>"<p>Vous avez ".$cptnotread." messages non lus sur ".$this->appname."</p><p>Vous pouvez les consulter sur <a href='".$this->url."'>".$this->url."</a></p>",
|
||||
"body_text"=>"Vous avez ".$cptnotread." messages non lus sur ".$this->appname."\nVous pouvez les consulter sur ".$this->url,
|
||||
);
|
||||
|
||||
$message = $this->container->get('cadoles.core.service.mail');
|
||||
$message->sendEmail($template, $mail_params, $user->getEmail(), $this->noreply, $this->appname);
|
||||
}
|
||||
if($tm-$tr>0) $cptnotread+=($tm-$tr);
|
||||
}
|
||||
if($cptnotread>0) {
|
||||
$this->writeln($user->getUsername()." notifié de ".$cptnotread." messages non lus");
|
||||
|
||||
$template="template";
|
||||
|
||||
$mail_params=array(
|
||||
"subject" => $this->appname." : Messages non lus",
|
||||
"body_html"=>"<p>Vous avez ".$cptnotread." messages non lus sur ".$this->appname."</p><p>Vous pouvez les consulter sur <a href='".$this->url."'>".$this->url."</a></p>",
|
||||
"body_text"=>"Vous avez ".$cptnotread." messages non lus sur ".$this->appname."\nVous pouvez les consulter sur ".$this->url,
|
||||
);
|
||||
|
||||
$message = $this->container->get('cadoles.core.service.mail');
|
||||
$message->sendEmail($template, $mail_params, $user->getEmail(), $this->noreply, $this->appname);
|
||||
}
|
||||
|
||||
}
|
||||
$this->writeln('');
|
||||
return 1;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB |
Loading…
Reference in New Issue