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

87 lines
2.4 KiB
Twig
Raw Permalink Normal View History

2017-11-08 20:08:32 +00:00
{% block search_bar %} <input type='text' class='searchbar' placeholder='Recherche'> {% endblock %}
{% for machine_cluster in core.get_clusters() %}
2017-11-08 20:08:32 +00:00
{% block machine_cluster_card %}
2017-11-08 20:08:32 +00:00
{% block card_tag %} <article class='inline-box' id='{{ machine_cluster.id_machine_cluster }}'> {% endblock %}
2017-11-08 20:08:32 +00:00
{% set nb_machines = core.get_nb_machines(machine_cluster.id_machine_cluster) %}
2017-11-08 20:08:32 +00:00
{% block card_title %} <span class='title' style='color: {{ core.theme }}'>{{ machine_cluster.name }}</span> {% endblock %}
2017-11-08 20:08:32 +00:00
{% block card_remove %} <span class='link_remove' data-cluster='{{ machine_cluster.id_machine_cluster }}'>{{ core.icon.remove | raw }}</span> {% endblock %}
{% block card_edit %} <span class='link_edit' data-cluster='{{ machine_cluster.id_machine_cluster }}'>{{ core.icon.edit | raw }}</span> {% endblock %}
2017-11-08 20:08:32 +00:00
{% block card_count %}
2017-11-08 20:08:32 +00:00
<span class='code'>
{{ core.icon.device | raw }}
<span>{{ nb_machines }} machines</span>
</span>
2017-11-08 20:08:32 +00:00
{% endblock %}
{% block card_permission_list %}
{% for permission in core.get_permissions() %}
{% block card_permission %}
<span class='groups'>
{% block card_permission_name %}
<span style='border-color: #ddd; background-color: #eee;'>
{{ core.permission_translate(permission.name, 'fr') }}
<span class='icon-permission'></span>
</span>
{% endblock %}
{% block auth_user_cluster_list %}
<span class='ignore'>
{% for user_cluster in core.get_authed_user_clusters(machine_cluster.id_machine_cluster, permission.id_permission) %}
{% block auth_user_cluster %}
<span>
{% block auth_user_cluster_name %} {{ user_cluster.name }} {% endblock %}
<span class='rem-permission' data-permission='{{ permission.id_permission }}' data-source='{{ user_cluster.id_user_cluster }}' data-target='{{ machine_cluster.id_machine_cluster }}'></span>
</span>
{% endblock %}
{% endfor %}
</span>
{% endblock %}
<span class='add-permission' data-target='{{ machine_cluster.id_machine_cluster }}' data-permission='{{ permission.id_permission }}'>+</span>
</span>
2017-11-08 20:08:32 +00:00
{% endblock %}
{% endfor %}
{% endblock %}
2017-11-08 20:08:32 +00:00
</article>
2017-11-08 20:08:32 +00:00
{% endblock %}
{# if no result #}
{% else %}
2017-11-08 20:08:32 +00:00
{% block no_result %}
<article class='inline-box'>
<span>Aucun groupe trouvé.</span>
</article>
{% endblock %}
{% endfor %}