From 4897fad9e61e86b6035bfaf7a0e473baa54f7a4a Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 8 Nov 2017 14:05:16 +0100 Subject: [PATCH] Blocks in view: user.group --- build/generic/view/machine/group/main.twig | 2 +- build/generic/view/user/group/main.twig | 79 ++++++++++++++-------- 2 files changed, 51 insertions(+), 30 deletions(-) diff --git a/build/generic/view/machine/group/main.twig b/build/generic/view/machine/group/main.twig index 1ce7523..e836acd 100644 --- a/build/generic/view/machine/group/main.twig +++ b/build/generic/view/machine/group/main.twig @@ -43,7 +43,7 @@ {% endblock %} - {% block card_group %} + {% block card_members %} {{ core.icon.group | raw }} diff --git a/build/generic/view/user/group/main.twig b/build/generic/view/user/group/main.twig index e805cc2..3c37653 100644 --- a/build/generic/view/user/group/main.twig +++ b/build/generic/view/user/group/main.twig @@ -1,44 +1,65 @@ - +{% block search_bar %} {% endblock %} -{% for cluster in core.get_clusters() %} -
+{% block group_list %} - {% set userlist = core.get_members(cluster.id_user_cluster) %} + {% for cluster in core.get_clusters() %} + {% block group_card %} - {{ cluster.name }} - {{ core.icon.remove | raw }} + {% block card_tag %}
{% endblock %} - {{ core.icon.edit | raw }} + {% set userlist = core.get_members(cluster.id_user_cluster) %} - - {{ core.icon.type | raw }} - {{ userlist | length }} utilisateurs - + {% block card_title %} {{ cluster.name }} {% endblock %} - - {{ core.icon.group | raw }} + {% block card_remove %} {{ core.icon.remove | raw }} {% endblock %} + {% block card_edit %} {{ core.icon.edit | raw }} {% endblock %} - - {% for user in userlist %} + {% block card_count %} - - {{ user.username }} - + + {{ core.icon.type | raw }} + {{ userlist | length }} utilisateurs - {% endfor %} - + {% endblock %} - + - + {% block card_members %} -
+ + {{ core.icon.group | raw }} -{# if no result #} -{% else %} + + {% for user in userlist %} -
- Aucun groupe trouvé. -
-{% endfor %} + + {{ user.username }} + + + + {% endfor %} +
+ + + +
+ + {% endblock %} + +
+ + {% endblock %} + + {# if no result #} + {% else %} + + {% block no_result %} + +
+ Aucun groupe trouvé. +
+ + {% endblock %} + + {% endfor %} + +{% endblock %} \ No newline at end of file