UX [admin][templates] fix styles on permissionsgroup pages for standard acl model (not vendee)

This commit is contained in:
Mathieu Jaumotte 2023-03-08 19:45:33 +01:00
parent 88ccbd450a
commit 2fe77f2610
3 changed files with 29 additions and 36 deletions

View File

@ -12,7 +12,7 @@
{% if edit_form.flags is defined %}
{{ form_row(edit_form.flags) }}
{% endif %}
{{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-chill-green' } } ) }}
{{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-save float-end' } } ) }}
{{ form_end(edit_form) }}
<h2>{{ 'Grant those permissions'|trans }} :</h2>
@ -22,7 +22,7 @@
<h3>{{ title|default("Unclassified")|trans }}</h3>
<table class="striped rounded">
<table class="table table-bordered border-dark">
<thead>
<tr>
<th>{{ 'Role'|trans }}</th>
@ -41,7 +41,7 @@
<small>{{ 'Which implies'|trans }}&nbsp;: {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small>
{% endif %}
</td>
<td>
<td style="width: 7em">
{%- if role_scope.scope is not null -%}
<span class="role_scope scope">
{{ role_scope.scope.name|localize_translatable_string }}
@ -50,9 +50,9 @@
<em>N/A</em>
{%- endif -%}
</td>
<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-chill-red' } } ) }}
{{ 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>
@ -66,30 +66,25 @@
<p>{{ 'This group does not provide any permission'|trans }}</p>
{%- endif -%}
<div class="mt-5">
<h2>{{ 'Grant new permissions'|trans }}</h2>
{{ form_start(add_role_scopes_form) }}
{{ form_errors(add_role_scopes_form) }}
{{ form_row(add_role_scopes_form.composed_role_scope.role) }}
{{ form_row(add_role_scopes_form.composed_role_scope.scope) }}
<h2 class="mt-5">{{ 'Grant new permissions'|trans }}</h2>
<ul class="record_actions sticky-form-buttons">
<li>
{{ form_row(add_role_scopes_form.submit, { 'attr' : { 'class': 'btn btn-create' } } ) }}
</li>
<li>
<a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}" class="btn btn-cancel">{{ 'Cancel'|trans }}</a>
</li>
<li>
<a href="{{ path('admin_permissionsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
{{ form_start(add_role_scopes_form) }}
{{ form_errors(add_role_scopes_form) }}
{{ form_row(add_role_scopes_form.composed_role_scope.role) }}
{{ form_row(add_role_scopes_form.composed_role_scope.scope) }}
{{ form_end(add_role_scopes_form) }}
</div>
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('admin_permissionsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_widget(add_role_scopes_form.submit, { 'attr' : { 'class': 'btn btn-create' } } ) }}
</li>
</ul>
{{ form_end(add_role_scopes_form) }}
{% endblock %}

View File

@ -5,7 +5,7 @@
{% block admin_content -%}
<h1>{{ 'Permissions group list'|trans }}</h1>
<table class="records_list">
<table class="records_list table table-bordered border-dark">
<thead>
<tr>
<th>{{ 'Name'|trans }}</th>

View File

@ -18,7 +18,7 @@
{% for title, role_scopes in role_scopes_sorted %}
<h3>{{ title|default('Unclassified')|trans }}</h3>
<table class="striped rounded">
<table class="table table-bordered border-dark">
<thead>
<tr>
<th>{{ 'Role'|trans }}</th>
@ -36,7 +36,7 @@
<small>{{ 'Which implies'|trans }}&nbsp;: {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small>
{% endif %}
</td>
<td>{%- if role_scope.scope is not null -%}
<td style="width: 7em">{%- if role_scope.scope is not null -%}
{{ role_scope.scope.name|localize_translatable_string }}
{%- else -%}
<em>N/A</em>
@ -57,17 +57,15 @@
{% endif %}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('admin_permissionsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }}
</a>
</li>
<li>
<a href="{{ path('admin_permissionsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
{% endblock %}