résolution conflit

This commit is contained in:
Arnaud Fornerot 2019-11-15 11:45:54 +01:00
commit 6ad1eb5569
15 changed files with 63 additions and 54 deletions

View File

@ -8,9 +8,8 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'Interne', 'SIREN'); (-100, 'Interne', 'SIREN');
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', 'Cadoles', '{SSHA}mjxx1N7FQauOJjM/wcrdc9MuhhBffobd (-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}YAgr/O4uRUcWbNTTnUPNUYGt9TyvjbjJ
', 'admin@eole27.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', 'SIREN', 'simple'); ', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
TRUNCATE TABLE sidebar; TRUNCATE TABLE sidebar;

View File

@ -57,6 +57,8 @@ class CoreController extends Controller
if($user) { if($user) {
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user); $notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
if(! $notices->isEmpty()) { if(! $notices->isEmpty()) {
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeUser($user,false);
return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[ return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[
'useheader' => true, 'useheader' => true,
'usemenu' => false, 'usemenu' => false,

View File

@ -662,7 +662,7 @@ class GroupController extends Controller
// Permission // Permission
$permgroup=$this->get('session')->get('permgroup'); $permgroup=$this->get('session')->get('permgroup');
if($access="user") { if($access=="user") {
if($permgroup=="NO_BODY") throw $this->createNotFoundException('Permission denied'); if($permgroup=="NO_BODY") throw $this->createNotFoundException('Permission denied');
if($permgroup=="ROLE_ANIM" && $this->isGranted('ROLE_USER')) throw $this->createNotFoundException('Permission denied'); if($permgroup=="ROLE_ANIM" && $this->isGranted('ROLE_USER')) throw $this->createNotFoundException('Permission denied');
} }

View File

@ -204,9 +204,9 @@ span.item-drag {
.grid { .grid {
list-style-type: none; list-style-type: none;
margin: 0px; margin: 0 auto;
padding: 0; padding: 0;
width: 100%; /*width: 100%;*/
min-height: 30px; min-height: 30px;
background: transparent; background: transparent;
} }
@ -232,6 +232,10 @@ span.item-drag {
display: block; display: block;
} }
.grid-item .grid-item-content {
height: 100%;
}
.grid-item .grid-item-content:hover { .grid-item .grid-item-content:hover {
opacity: 0.8; opacity: 0.8;
} }

View File

@ -1980,11 +1980,12 @@ class PagewidgetController extends Controller
$title=$groupshared->getLabel(); $title=$groupshared->getLabel();
$idpage=$groupshared->pagesshared[0]->getId(); $idpage=$groupshared->pagesshared[0]->getId();
$color=$groupshared->getColor();
$icon=null; $icon=null;
if($groupshared->getIcon()) if($groupshared->getIcon())
$icon="/".$groupshared->getIcon()->getLabel(); $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); $this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
if(is_array($groupsshared)) { if(is_array($groupsshared)) {
foreach($groupsshared as $groupshared) { 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 // On récupère l'ensemble des messages du groupes
$messages=$this->getDoctrine()->getRepository("CadolesWebsocketBundle:Message")->findBy(["group"=>$groupshared]); $messages=$this->getDoctrine()->getRepository("CadolesWebsocketBundle:Message")->findBy(["group"=>$groupshared]);
foreach($messages as $key => $message) { foreach($messages as $key => $message) {
@ -2051,7 +2057,7 @@ class PagewidgetController extends Controller
} }
foreach($messages as $key => $message) { 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); array_push($mymsg,$tmp);
} }
} }

View File

@ -80,6 +80,8 @@
{% endblock %} {% endblock %}
{% block localjavascript %} {% block localjavascript %}
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'};
$('document').ready(function(){ $('document').ready(function(){
// Ajustement des frames // Ajustement des frames
$(window).resize(function() { $(window).resize(function() {
@ -192,7 +194,6 @@
$(".colcontainer .col").css("padding-bottom",""); $(".colcontainer .col").css("padding-bottom","");
// Création des grilles d'items // Création des grilles d'items
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
}, },
update: updateLocalisation update: updateLocalisation
@ -201,7 +202,6 @@
// Création des grilles d'items // Création des grilles d'items
var optiongrid={columnWidth: '.grid-sizer', itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'};
$('body').imagesLoaded(function() { $('body').imagesLoaded(function() {
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
}); });
@ -285,7 +285,6 @@
widget.children(".widgetbody" ).toggle(); widget.children(".widgetbody" ).toggle();
// On recalcule les grilles // On recalcule les grilles
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
} }
@ -460,7 +459,6 @@
$(".widget[data-id="+idwidget+"]").find(".flux-"+id).show(); $(".widget[data-id="+idwidget+"]").find(".flux-"+id).show();
} }
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
} }
@ -496,7 +494,6 @@
} }
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
} }
@ -528,7 +525,6 @@
} }
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
} }
@ -546,7 +542,6 @@
ele.show(); ele.show();
ele.removeClass("msg-hidden"); ele.removeClass("msg-hidden");
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid); var grid = $('.grid').masonry(optiongrid);
} }

View File

@ -5,6 +5,7 @@
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} {% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
{% set colormain = constants.mycolormain() %}
{% set stylewidget = constants.mystylewidget(entity) %} {% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} {% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} {% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
@ -52,7 +53,7 @@
{% for group in groups %} {% for group in groups %}
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};"> <div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
<a href="{{path('cadoles_core_home',{id:group.id})}}" target="_top" 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"> <div class="grid-item-logo">
{% if group.icon %} {% if group.icon %}
<img class="grid-item-img" height="110" src="/{{ alias }}{{ group.icon }}" /> <img class="grid-item-img" height="110" src="/{{ alias }}{{ group.icon }}" />

View File

@ -5,6 +5,7 @@
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %} {% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
{% set colormain = constants.mycolormain() %}
{% set stylewidget = constants.mystylewidget(entity) %} {% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} {% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %} {% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
@ -72,7 +73,7 @@
{% endif %} {% endif %}
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};"> <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="item-link clearfix">
<div class="grid-item-logo"> <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%"> <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="caption">
<div class="grid-item-title" style="position:inherit; width:85%"> <div class="grid-item-title" style="position:inherit; width:85%">
{{message.user.lastname}} {{message.user.firstname}}<br> {{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 }} {{ message.topic | raw }}
</div> </div>
</div> </div>

View File

@ -54,6 +54,7 @@ class CountMessageCommand extends Command
foreach($user->getGroups() as $usergroup) { foreach($user->getGroups() as $usergroup) {
// On calcule le nombre de message non lu pour l'utilisateur' // On calcule le nombre de message non lu pour l'utilisateur'
$group=$usergroup->getGroup(); $group=$usergroup->getGroup();
if($group->getFgcanshare()) {
$qb = $this->em->createQueryBuilder(); $qb = $this->em->createQueryBuilder();
$tm = $qb ->select($qb->expr()->count('m.id')) $tm = $qb ->select($qb->expr()->count('m.id'))
->from('CadolesWebsocketBundle:Message', 'm') ->from('CadolesWebsocketBundle:Message', 'm')
@ -89,7 +90,7 @@ class CountMessageCommand extends Command
$message = $this->container->get('cadoles.core.service.mail'); $message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $user->getEmail(), $this->noreply, $this->appname); $message->sendEmail($template, $mail_params, $user->getEmail(), $this->noreply, $this->appname);
} }
}
} }
$this->writeln(''); $this->writeln('');
return 1; return 1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB