SMMP/build/generic/view/user/group/main.twig

45 lines
1.2 KiB
Twig

<input type='text' class='searchbar' placeholder='Recherche'>
{% for cluster in core.get_clusters() %}
<article class='inline-box' id='{{ cluster.id_user_cluster }}'>
{% set userlist = core.get_members(cluster.id_user_cluster) %}
<span class='title' style='color: {{ core.theme }}'>{{ cluster.name }}</span>
<span class='link_remove' data-cluster='{{ cluster.id_user_cluster }}'>{{ core.icon.remove | raw }}</span>
<span class='link_edit' data-cluster='{{ cluster.id_user_cluster }}'>{{ core.icon.edit | raw }}</span>
<span class='code'>
{{ core.icon.type | raw }}
<span>{{ userlist | length }} utilisateurs</span>
</span>
<span class='groups'>
{{ core.icon.group | raw }}
<span class='ignore'>
{% for user in userlist %}
<span>
{{ user.username }}
<span class='rem-member' data-member='{{ user.id_user }}' data-cluster='{{ cluster.id_user_cluster }}'></span>
</span>
{% endfor %}
</span>
<span class='add-member' data-cluster='{{ cluster.id_user_cluster }}'>+</span>
</span>
</article>
{# if no result #}
{% else %}
<article class='inline-box'>
<span>Aucun groupe trouvé.</span>
</article>
{% endfor %}