résolution conflit
This commit is contained in:
commit
6ad1eb5569
@ -8,9 +8,8 @@ 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', 'Cadoles', '{SSHA}mjxx1N7FQauOJjM/wcrdc9MuhhBffobd
|
||||
', 'admin@eole27.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', 'SIREN', 'simple');
|
||||
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}YAgr/O4uRUcWbNTTnUPNUYGt9TyvjbjJ
|
||||
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||
|
||||
|
||||
TRUNCATE TABLE sidebar;
|
||||
|
@ -57,6 +57,8 @@ 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 dugroupe de travail : ".$group->getLabel();
|
||||
$text=$user->getUsername()." a été désinscrit du groupe 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 dugroupe de travail : ".$group->getLabel();
|
||||
$text=$user->getUsername()." a été désinscrit du groupe 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 dugroupe de travail : ".$group->getLabel();
|
||||
$text=$data->getUsername()." a été désinscrit du groupe 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: 0px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
/*width: 100%;*/
|
||||
min-height: 30px;
|
||||
background: transparent;
|
||||
}
|
||||
@ -232,6 +232,10 @@ span.item-drag {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.grid-item .grid-item-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.grid-item .grid-item-content:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
@ -1980,11 +1980,12 @@ 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]);
|
||||
array_push($mygroups,["title"=>$title,"icon"=>$icon,"id"=>$idpage,"color"=>$color]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2038,6 +2039,11 @@ 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) {
|
||||
@ -2051,7 +2057,7 @@ class PagewidgetController extends Controller
|
||||
}
|
||||
|
||||
foreach($messages as $key => $message) {
|
||||
$tmp=["id" => $message->getId(), "user" => $message->getUser(), "date"=>$message->getSubmitdate(), "topic"=>$message->getTopic()];
|
||||
$tmp=["id" => $message->getId(), "user" => $message->getUser(), "date"=>$message->getSubmitdate(), "topic"=>$message->getTopic(), "pageid" => $idpage, "pagetitle" => $title, "color" => $color];
|
||||
array_push($mymsg,$tmp);
|
||||
}
|
||||
}
|
||||
|
@ -80,6 +80,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'};
|
||||
|
||||
$('document').ready(function(){
|
||||
// Ajustement des frames
|
||||
$(window).resize(function() {
|
||||
@ -192,7 +194,6 @@
|
||||
$(".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
|
||||
@ -201,7 +202,6 @@
|
||||
|
||||
|
||||
// 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,7 +285,6 @@
|
||||
widget.children(".widgetbody" ).toggle();
|
||||
|
||||
// On recalcule les grilles
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
@ -460,7 +459,6 @@
|
||||
$(".widget[data-id="+idwidget+"]").find(".flux-"+id).show();
|
||||
}
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
@ -496,7 +494,6 @@
|
||||
}
|
||||
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
@ -528,7 +525,6 @@
|
||||
}
|
||||
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
}
|
||||
|
||||
@ -546,7 +542,6 @@
|
||||
ele.show();
|
||||
ele.removeClass("msg-hidden");
|
||||
|
||||
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
|
||||
var grid = $('.grid').masonry(optiongrid);
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
|
||||
|
||||
{% set colormain = constants.mycolormain() %}
|
||||
{% set stylewidget = constants.mystylewidget(entity) %}
|
||||
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
|
||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||
@ -52,7 +53,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">
|
||||
<div class="grid-item-content" style="background-color:{{ group.color ? "#"~group.color : '#'~colormain }}">
|
||||
<div class="grid-item-logo">
|
||||
{% if group.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}{{ group.icon }}" />
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
|
||||
|
||||
{% set colormain = constants.mycolormain() %}
|
||||
{% set stylewidget = constants.mystylewidget(entity) %}
|
||||
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
|
||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||
@ -72,7 +73,7 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};">
|
||||
<div class="grid-item-content">
|
||||
<div class="grid-item-content" style="background-color:{{ message.color ? "#"~message.color : '#'~colormain }}">
|
||||
<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%">
|
||||
@ -82,7 +83,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')}}</small><br><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>
|
||||
{{ message.topic | raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,42 +54,43 @@ class CountMessageCommand extends Command
|
||||
foreach($user->getGroups() as $usergroup) {
|
||||
// On calcule le nombre de message non lu pour l'utilisateur'
|
||||
$group=$usergroup->getGroup();
|
||||
$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();
|
||||
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();
|
||||
$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($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($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;
|
||||
|
BIN
src/ninegate-1.0/web/uploads/icon/icon_dokuwiki.png
Normal file
BIN
src/ninegate-1.0/web/uploads/icon/icon_dokuwiki.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
src/ninegate-1.0/web/uploads/icon/icon_grr.png
Normal file
BIN
src/ninegate-1.0/web/uploads/icon/icon_grr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
BIN
src/ninegate-1.0/web/uploads/icon/icon_kanboard.png
Executable file
BIN
src/ninegate-1.0/web/uploads/icon/icon_kanboard.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
src/ninegate-1.0/web/uploads/icon/icon_opensondage.png
Normal file
BIN
src/ninegate-1.0/web/uploads/icon/icon_opensondage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
src/ninegate-1.0/web/uploads/icon/icon_piwik.png
Normal file
BIN
src/ninegate-1.0/web/uploads/icon/icon_piwik.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
Loading…
Reference in New Issue
Block a user