From 0a3d4d9a0a602a3e86d9a74d339263a6ec46e612 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 8 Nov 2017 21:08:32 +0100 Subject: [PATCH] Blocks in view: group.permission --- build/generic/view/group/permission/main.twig | 94 +++++++++++++------ 1 file changed, 65 insertions(+), 29 deletions(-) diff --git a/build/generic/view/group/permission/main.twig b/build/generic/view/group/permission/main.twig index ead74a8..04ef6f3 100644 --- a/build/generic/view/group/permission/main.twig +++ b/build/generic/view/group/permission/main.twig @@ -1,50 +1,86 @@ - +{% block search_bar %} {% endblock %} {% for machine_cluster in core.get_clusters() %} -
- {% set nb_machines = core.get_nb_machines(machine_cluster.id_machine_cluster) %} + {% block machine_cluster_card %} - {{ machine_cluster.name }} - {# {{ core.icon.remove | raw }} + {% block card_tag %}
{% endblock %} - {{ core.icon.edit | raw }} #} + {% set nb_machines = core.get_nb_machines(machine_cluster.id_machine_cluster) %} - - {{ core.icon.device | raw }} - {{ nb_machines }} machines - + {% block card_title %} {{ machine_cluster.name }} {% endblock %} + {% block card_remove %} {{ core.icon.remove | raw }} {% endblock %} + {% block card_edit %} {{ core.icon.edit | raw }} {% endblock %} - {% for permission in core.get_permissions() %} + {% block card_count %} - - - {{ core.permission_translate(permission.name, 'fr') }} - + + {{ core.icon.device | raw }} + {{ nb_machines }} machines - - {% for user_cluster in core.get_authed_user_clusters(machine_cluster.id_machine_cluster, permission.id_permission) %} - - {{ user_cluster.name }} - + {% endblock %} + + + {% block card_permission_list %} + + {% for permission in core.get_permissions() %} + + {% block card_permission %} + + + + {% block card_permission_name %} + + + {{ core.permission_translate(permission.name, 'fr') }} + + + + {% endblock %} + + {% block auth_user_cluster_list %} + + + {% for user_cluster in core.get_authed_user_clusters(machine_cluster.id_machine_cluster, permission.id_permission) %} + + {% block auth_user_cluster %} + + + {% block auth_user_cluster_name %} {{ user_cluster.name }} {% endblock %} + + + + {% endblock %} + + {% endfor %} + + + {% endblock %} + + + - {% endfor %} - - + - + {% endblock %} - {% endfor %} + {% endfor %} -
+ {% endblock %} + +
+ + {% endblock %} {# if no result #} {% else %} -
- Aucun groupe trouvé. -
+ {% block no_result %} + +
+ Aucun groupe trouvé. +
+ + {% endblock %} {% endfor %}