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