Blocks in view: user.group

This commit is contained in:
xdrm-brackets 2017-11-08 14:05:16 +01:00
parent 6c94f1064b
commit 4897fad9e6
2 changed files with 51 additions and 30 deletions

View File

@ -43,7 +43,7 @@
{% endblock %} {% endblock %}
{% block card_group %} {% block card_members %}
<span class='groups'> <span class='groups'>
{{ core.icon.group | raw }} {{ core.icon.group | raw }}

View File

@ -1,44 +1,65 @@
<input type='text' class='searchbar' placeholder='Recherche'> {% block search_bar %} <input type='text' class='searchbar' placeholder='Recherche'> {% endblock %}
{% for cluster in core.get_clusters() %} {% block group_list %}
<article class='inline-box' id='{{ cluster.id_user_cluster }}'>
{% set userlist = core.get_members(cluster.id_user_cluster) %} {% for cluster in core.get_clusters() %}
{% block group_card %}
<span class='title' style='color: {{ core.theme }}'>{{ cluster.name }}</span> {% block card_tag %} <article class='inline-box' id='{{ cluster.id_user_cluster }}'> {% endblock %}
<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> {% set userlist = core.get_members(cluster.id_user_cluster) %}
<span class='code'> {% block card_title %} <span class='title' style='color: {{ core.theme }}'>{{ cluster.name }}</span> {% endblock %}
{{ core.icon.type | raw }}
<span>{{ userlist | length }} utilisateurs</span>
</span>
<span class='groups'> {% block card_remove %} <span class='link_remove' data-cluster='{{ cluster.id_user_cluster }}'>{{ core.icon.remove | raw }}</span> {% endblock %}
{{ core.icon.group | raw }} {% block card_edit %} <span class='link_edit' data-cluster='{{ cluster.id_user_cluster }}'>{{ core.icon.edit | raw }}</span> {% endblock %}
<span class='ignore'> {% block card_count %}
{% for user in userlist %}
<span> <span class='code'>
{{ user.username }} {{ core.icon.type | raw }}
<span class='rem-member' data-member='{{ user.id_user }}' data-cluster='{{ cluster.id_user_cluster }}'></span> <span>{{ userlist | length }} utilisateurs</span>
</span> </span>
{% endfor %} {% endblock %}
</span>
<span class='add-member' data-cluster='{{ cluster.id_user_cluster }}'>+</span> {% block card_members %}
</span>
</article> <span class='groups'>
{{ core.icon.group | raw }}
{# if no result #} <span class='ignore'>
{% else %} {% for user in userlist %}
<article class='inline-box'> <span>
<span>Aucun groupe trouvé.</span> {{ user.username }}
</article> <span class='rem-member' data-member='{{ user.id_user }}' data-cluster='{{ cluster.id_user_cluster }}'></span>
{% endfor %} </span>
{% endfor %}
</span>
<span class='add-member' data-cluster='{{ cluster.id_user_cluster }}'>+</span>
</span>
{% endblock %}
</article>
{% endblock %}
{# if no result #}
{% else %}
{% block no_result %}
<article class='inline-box'>
<span>Aucun groupe trouvé.</span>
</article>
{% endblock %}
{% endfor %}
{% endblock %}