65 lines
3.2 KiB
Twig
65 lines
3.2 KiB
Twig
{% set widgetname="info" %}
|
|
{% extends 'Pagewidget/widget.twig' %}
|
|
|
|
{% block widgetmenu %}
|
|
{% endblock %}
|
|
|
|
{% block widgetbody %}
|
|
{% for group in entity.page.groups %}
|
|
{% if entity.page.groups|length > 1 or not widgethaveheader %}
|
|
<h3 style="margin:0px; font-size:25px; {{colorbodyfont}} ">{{group.label}}</h3>
|
|
{% endif %}
|
|
{% if group.description %}
|
|
{{ group.description|nl2br}}
|
|
<br><br>
|
|
{% endif %}
|
|
<div class="items-list">
|
|
{% for member in group.users %}
|
|
<div class="item item-verysmall" style="background-color: var(--colorbgbodydark);">
|
|
<div class="item-container">
|
|
<div class="item-content">
|
|
<div class="item-link">
|
|
<img src="{{ path('app_minio_image',{file:"avatar/"~member.user.avatar}) }}" class="avatar" style="height:40px; width: 40px;">
|
|
<div class="item-title">
|
|
<h3>{{ member.user.lastname }} {{ member.user.firstname }}</h3>
|
|
<div class="item-subtitle" style="display:block !important">
|
|
{% if member.rolegroup==100 %}
|
|
<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i>
|
|
{% elseif member.rolegroup==90 %}
|
|
<i class="fa fa-star"></i><i class="fa fa-star"></i>
|
|
{% elseif member.rolegroup==50 %}
|
|
<i class="fa fa-star"></i>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{%if canadd %}
|
|
<div class="item item-verysmall" style="background-color: var(--colorbgbodydark);">
|
|
<div class="item-container">
|
|
<div class="item-content">
|
|
<a class="item-link" href="{{path("app_all_group_users",{id:group.id,idpage:entity.page.id,usage:usage})}}" target="_top">
|
|
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_add.png"}) }}">
|
|
<div class="item-title">
|
|
<h3 >Ajouter</h3>
|
|
<div class="item-subtitle">Ajouter un Utilisateur</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if entity.page.groups|length == 0 and entity.page.user %}
|
|
<center>
|
|
<img src="{{ path('app_minio_image',{file:"avatar/"~entity.page.user.avatar}) }}" class="avatar" style="height:128px; width: 128px; margin-bottom:15px">
|
|
</center>
|
|
{% endif %}
|
|
{% endblock %}
|