prise en compte de la couleur des groupes (ref #38)
This commit is contained in:
parent
7f23665454
commit
c2412b504c
@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
|
||||
(-100, 'DRAAF', '130007107');
|
||||
|
||||
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}kqZ/9F8nhk0LurMspUojmlG3x0R/xd93
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}YAgr/O4uRUcWbNTTnUPNUYGt9TyvjbjJ
|
||||
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||
|
||||
|
||||
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2041,6 +2042,7 @@ class PagewidgetController extends Controller
|
||||
// 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]);
|
||||
@ -2055,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(), "pageid" => $idpage, "pagetitle" => $title];
|
||||
$tmp=["id" => $message->getId(), "user" => $message->getUser(), "date"=>$message->getSubmitdate(), "topic"=>$message->getTopic(), "pageid" => $idpage, "pagetitle" => $title, "color" => $color];
|
||||
array_push($mymsg,$tmp);
|
||||
}
|
||||
}
|
||||
|
@ -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%">
|
||||
|
Loading…
Reference in New Issue
Block a user