mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
UX: [Admin][persmissionsgroup] complete in template: content wrapper with bootstrap classes
This commit is contained in:
parent
034e2553bc
commit
025ee2ea95
@ -64,7 +64,7 @@ ul.record_actions {
|
|||||||
|
|
||||||
.sticky-form {
|
.sticky-form {
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
padding: 1em;
|
padding-top: 1.25em;
|
||||||
margin: -1em;
|
margin: -1em;
|
||||||
box-shadow: 0 -20px 20px -20px rgba($chill-gray, .5);
|
box-shadow: 0 -20px 20px -20px rgba($chill-gray, .5);
|
||||||
@include sticky-bottom;
|
@include sticky-bottom;
|
||||||
|
@ -3,77 +3,82 @@
|
|||||||
{% block title %}{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}{% endblock %}
|
{% block title %}{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}{% endblock %}
|
||||||
|
|
||||||
{% block admin_content -%}
|
{% block admin_content -%}
|
||||||
<h1 class="mb-4">{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}</h1>
|
<div class="container-xxl">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
<h2>{{ 'Details'|trans }}</h2>
|
<h1 class="mb-4">{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}</h1>
|
||||||
|
|
||||||
{{ form_start(edit_form) }}
|
<h2>{{ 'Details'|trans }}</h2>
|
||||||
{{ form_row(edit_form.name) }}
|
|
||||||
{% if edit_form.flags is defined %}
|
|
||||||
{{ form_row(edit_form.flags) }}
|
|
||||||
{% endif %}
|
|
||||||
{{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-save float-end' } } ) }}
|
|
||||||
{{ form_end(edit_form) }}
|
|
||||||
|
|
||||||
<h2 class="mb-5">{{ 'Grant those permissions'|trans }} :</h2>
|
{{ form_start(edit_form) }}
|
||||||
|
{{ form_row(edit_form.name) }}
|
||||||
|
{% if edit_form.flags is defined %}
|
||||||
|
{{ form_row(edit_form.flags) }}
|
||||||
|
{% endif %}
|
||||||
|
{{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-save float-end' } } ) }}
|
||||||
|
{{ form_end(edit_form) }}
|
||||||
|
|
||||||
{%- if entity.getRoleScopes|length > 0 -%}
|
<h2 class="mb-5">{{ 'Grant those permissions'|trans }} :</h2>
|
||||||
{% for title, role_scopes in role_scopes_sorted %}
|
|
||||||
|
|
||||||
<h3>{{ title|default("Unclassified")|trans }}</h3>
|
{%- if entity.getRoleScopes|length > 0 -%}
|
||||||
|
{% for title, role_scopes in role_scopes_sorted %}
|
||||||
|
|
||||||
<table class="table table-bordered border-dark align-middle mb-5">
|
<h3>{{ title|default("Unclassified")|trans }}</h3>
|
||||||
<thead>
|
|
||||||
|
<table class="table table-bordered border-dark align-middle mb-5">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{ 'Circle'|trans }}</th>
|
||||||
|
<th class="w-75">{{ 'Role'|trans }}</th>
|
||||||
|
<th>{{ 'Actions'|trans }}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{% for role_scope in role_scopes %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ 'Circle'|trans }}</th>
|
<td style="width: 7em">
|
||||||
<th class="w-75">{{ 'Role'|trans }}</th>
|
{%- if role_scope.scope is not null -%}
|
||||||
<th>{{ 'Actions'|trans }}</th>
|
<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 }}</span>
|
||||||
|
{% if expanded_roles[role_scope.role]|length > 1 %}
|
||||||
|
<div class="help-text">
|
||||||
|
<span style="text-decoration: underline dotted;">{{ 'Which implies'|trans }} :</span>
|
||||||
|
{% for role in expanded_roles[role_scope.role] %}
|
||||||
|
{% if role != role_scope.role %}
|
||||||
|
{{ role|trans }}
|
||||||
|
{% if not loop.last %}, {% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% 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' } } ) }}
|
||||||
|
{{ form_end(delete_role_scopes_form[role_scope.id]) }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
{% for role_scope in role_scopes %}
|
{% endfor %}
|
||||||
<tr>
|
</tbody>
|
||||||
<td style="width: 7em">
|
</table>
|
||||||
{%- if role_scope.scope is not null -%}
|
{% endfor %}
|
||||||
<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 }}</span>
|
|
||||||
{% if expanded_roles[role_scope.role]|length > 1 %}
|
|
||||||
<div class="help-text">
|
|
||||||
<span style="text-decoration: underline dotted;">{{ 'Which implies'|trans }} :</span>
|
|
||||||
{% for role in expanded_roles[role_scope.role] %}
|
|
||||||
{% if role != role_scope.role %}
|
|
||||||
{{ role|trans }}
|
|
||||||
{% if not loop.last %}, {% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% 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' } } ) }}
|
|
||||||
{{ form_end(delete_role_scopes_form[role_scope.id]) }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{% endfor %}
|
{%- else -%}
|
||||||
</tbody>
|
<p>{{ 'This group does not provide any permission'|trans }}</p>
|
||||||
</table>
|
{%- endif -%}
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{%- else -%}
|
</div>
|
||||||
<p>{{ 'This group does not provide any permission'|trans }}</p>
|
<div class="row sticky-form">
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
<div class="sticky-form">
|
|
||||||
<h2>{{ 'Grant new permissions'|trans }}</h2>
|
<h2>{{ 'Grant new permissions'|trans }}</h2>
|
||||||
|
|
||||||
{{ form_start(add_role_scopes_form) }}
|
{{ form_start(add_role_scopes_form) }}
|
||||||
@ -100,7 +105,7 @@
|
|||||||
{{ form_end(add_role_scopes_form) }}
|
{{ form_end(add_role_scopes_form) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user