widget group correctif

This commit is contained in:
afornerot 2019-08-22 11:29:23 +02:00
parent 5c85fbb034
commit 0fc6edbb4d
2 changed files with 10 additions and 8 deletions

View File

@ -1952,16 +1952,16 @@ class PagewidgetController extends Controller
}
$mygroups=[];
foreach($this->getUser()->getGroups() as $usergroup) {
if($usergroup->getGroup()->getFgcanshare()) {
$title=$usergroup->getGroup()->getLabel();
$icon=null;
if($usergroup->getGroup()->getIcon())
$icon="/".$group->getIcon()->getLabel();
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
foreach($groupsshared as $groupshared) {
$title=$groupshared->getLabel();
$idpage=$groupshared->pagesshared[0]->getId();
$icon=null;
if($groupshared->getIcon())
$icon="/".$groupshared->getIcon()->getLabel();
array_push($mygroups,["title"=>$title,"icon"=>$icon]);
}
array_push($mygroups,["title"=>$title,"icon"=>$icon,"id"=>$idpage]);
}
// Render

View File

@ -38,6 +38,7 @@
<div class="grid-gutter-sizer"></div>
{% for group in groups %}
<div class="grid-item grid-small">
<a href="{{path('cadoles_core_home',{id:group.id})}}" target="_top">
<div class="grid-item-content" style="{{ stylewidgetbodyreverse }}">
<div class="grid-item-logo">
{% if group.icon %}
@ -52,6 +53,7 @@
{{ group.title }}
</div>
</div>
</a>
</div>
{% endfor %}
</div>