Make a hierarchy in roles

This is more understandable for users.
This commit is contained in:
2017-04-19 21:24:35 +02:00
parent b6d1f05e00
commit 0e5ab47474
7 changed files with 190 additions and 33 deletions

View File

@@ -13,9 +13,11 @@
</tr>
</tbody>
</table>
{% if role_scopes|length > 0 %}
{% if role_scopes_sorted|length > 0 %}
<h2>{{ 'Grant those permissions'|trans }}&nbsp;:</h2>
{% for title, role_scopes in role_scopes_sorted %}
<h3>{{ title|default('Unclassified')|trans }}</h3>
<table class="striped rounded">
<thead>
<tr>
@@ -24,6 +26,7 @@
</tr>
</thead>
<tbody>
{% for role_scope in role_scopes %}
<tr>
<td>
@@ -43,6 +46,7 @@
{% endfor %}
</tbody>
</table>
{% endfor %}
{% else %}
@@ -51,16 +55,18 @@
{{ 'add permissions'|trans|capitalize }}</a></p>
{% endif %}
<ul class="record_actions">
<li>
<a href="{{ path('admin_permissionsgroup') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li>
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
</li>
<li>
<a href="{{ path('admin_permissionsgroup') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
{% endblock %}