bouton add en premier (fixes #60)

This commit is contained in:
afornerot 2019-12-13 16:27:44 +01:00
parent cba255f52c
commit 6741bfffe6
2 changed files with 33 additions and 34 deletions

View File

@ -1907,7 +1907,7 @@ class PagewidgetController extends Controller
// Render
return $this->render($this->labelentity.':viewinfo.html.twig', [
'entity' => $entity,
'canadd' => ($user),
'canadd' => $canupdate,
'canupdate' => $canupdate,
'usage' => $usage,
'icon' => $icon,

View File

@ -28,7 +28,6 @@
</div>
{% endif %}
{% set canadd = false %}
<div class="widgetheader" style="{{ stylewidgetheader }}; padding-top:10px;">
{% set style = "margin: auto; display: inherit;background-color:transparent;" %}
{% if icon %}
@ -51,33 +50,12 @@
<div class="grid clearfix">
<div class="grid-sizer grid-small"></div>
<div class="grid-gutter-sizer"></div>
{% for member in members %}
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-content">
<div class="grid-item-logo">
<img onclick="seeUser({{member.user.id}})" src="/{{ alias }}/uploads/avatar/{{ member.user.avatar}}" class="grid-item-img avatar" height="110" style="cursor:pointer;">
</div>
<div class="grid-item-title">
<h2 style="{{ stylewidgetbodyreverse }};">
{{ member.user.lastname }} {{ member.user.firstname }}
{%if member.fgmanager%}
<br>
<i style="{{ stylewidgetbodyreverse }};" class="fa fa-star" title="Manager"></i>
{% if member.user==app.user %}
{% set canadd=true %}
{% endif %}
{%endif%}
</h2>
</div>
</div>
</div>
{% endfor %}
{% if canadd==true %}
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }}; height:150px">
<a href="{{path('cadoles_core_user_group_users',{'id':id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-content">
<a href="{{path('cadoles_core_user_group_users',{'id':id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
<div class="item-link clearfix">
<div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
</div>
@ -89,7 +67,28 @@
</div>
</a>
</div>
</div>
{% endif %}
{% for member in members %}
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-content">
<div class="item-link clearfix">
<div class="grid-item-logo">
<img onclick="seeUser({{member.user.id}})" src="/{{ alias }}/uploads/avatar/{{ member.user.avatar}}" class="grid-item-img avatar" height="110" style="cursor:pointer;">
</div>
<div class="grid-item-title">
<h2 style="{{ stylewidgetbodyreverse }};">
{{ member.user.lastname }} {{ member.user.firstname }}
</h2>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>