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=[]; $mygroups=[];
foreach($this->getUser()->getGroups() as $usergroup) { $this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
if($usergroup->getGroup()->getFgcanshare()) { foreach($groupsshared as $groupshared) {
$title=$usergroup->getGroup()->getLabel();
$icon=null;
if($usergroup->getGroup()->getIcon())
$icon="/".$group->getIcon()->getLabel();
$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 // Render

View File

@ -38,6 +38,7 @@
<div class="grid-gutter-sizer"></div> <div class="grid-gutter-sizer"></div>
{% for group in groups %} {% for group in groups %}
<div class="grid-item grid-small"> <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-content" style="{{ stylewidgetbodyreverse }}">
<div class="grid-item-logo"> <div class="grid-item-logo">
{% if group.icon %} {% if group.icon %}
@ -52,6 +53,7 @@
{{ group.title }} {{ group.title }}
</div> </div>
</div> </div>
</a>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>