Permissions more readables with scope before role

This commit is contained in:
Mathieu Jaumotte 2023-04-14 17:17:41 +02:00
parent 499417aea5
commit ffc3a97651
3 changed files with 18 additions and 18 deletions

View File

@ -25,8 +25,8 @@
<table class="table table-bordered border-dark align-middle mb-5">
<thead>
<tr>
<th class="w-75">{{ 'Role'|trans }}</th>
<th>{{ 'Circle'|trans }}</th>
<th class="w-75">{{ 'Role'|trans }}</th>
<th>{{ 'Actions'|trans }}</th>
</tr>
</thead>
@ -34,6 +34,15 @@
{% for role_scope in role_scopes %}
<tr>
<td style="width: 7em">
{%- if role_scope.scope is not null -%}
<span class="role_scope scope">
{{ role_scope.scope.name|localize_translatable_string }}
</span>
{%- else -%}
<small><i>N/A</i></small>
{%- endif -%}
</td>
<td>
<span class="role_scope role">{{ role_scope.role|trans|replace({'(⚑)': ''}) }}</span>
{% if expanded_roles[role_scope.role]|length > 1 %}
@ -48,15 +57,6 @@
</div>
{% endif %}
</td>
<td style="width: 7em">
{%- if role_scope.scope is not null -%}
<span class="role_scope scope">
{{ role_scope.scope.name|localize_translatable_string }}
</span>
{%- else -%}
<em>N/A</em>
{%- endif -%}
</td>
<td style="width: 7em">
{{ form_start(delete_role_scopes_form[role_scope.id]) }}
{{ form_widget(delete_role_scopes_form[role_scope.id].submit, { 'attr': { 'class': 'btn btn-remove' } } ) }}

View File

@ -22,14 +22,20 @@
<table class="table table-bordered border-dark align-middle mb-5">
<thead>
<tr>
<th>{{ 'Role'|trans }}</th>
<th class="w-25">{{ 'Circle'|trans }}</th>
<th>{{ 'Role'|trans }}</th>
</tr>
</thead>
<tbody>
{% for role_scope in role_scopes %}
<tr>
<td style="width: 7em">{%- if role_scope.scope is not null -%}
{{ role_scope.scope.name|localize_translatable_string }}
{%- else -%}
<small><i>N/A</i></small>
{%- endif -%}
</td>
<td>
<span class="role_scope role">{{ role_scope.role|trans|replace({'(⚑)': ''}) }}</span>
{% if expanded_roles[role_scope.role]|length > 1 %}
@ -44,12 +50,6 @@
</div>
{% endif %}
</td>
<td style="width: 7em">{%- if role_scope.scope is not null -%}
{{ role_scope.scope.name|localize_translatable_string }}
{%- else -%}
<small><i>N/A</i></small>
{%- endif -%}
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -167,7 +167,7 @@ Permissionsgroup: Groupe de permissions
New permission group: Nouveau groupe de permissions
PermissionsGroup "%name%" edit: Modification du groupe de permission '%name%'
Role: Rôle
Choose amongst roles: Choisir parmi les rôles
Choose amongst roles: Choisir un rôle
Choose amongst scopes: Choisir un cercle
Add permission: Ajouter les permissions
This group does not provide any permission: Ce groupe n'attribue aucune permission