admin: refactor templates and delete some show pages for Center, Scope, User, UserJob, PermissionsGroup

This commit is contained in:
nobohan 2022-05-05 09:47:17 +02:00
parent b09d92eae8
commit ba495def7e
27 changed files with 207 additions and 228 deletions

View File

@ -36,7 +36,7 @@ class CenterController extends AbstractController
$em->persist($center); $em->persist($center);
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('admin_center_show', ['id' => $center->getId()])); return $this->redirect($this->generateUrl('admin_center'));
} }
return $this->render('@ChillMain/Center/new.html.twig', [ return $this->render('@ChillMain/Center/new.html.twig', [

View File

@ -36,7 +36,7 @@ class ScopeController extends AbstractController
$em->persist($scope); $em->persist($scope);
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('admin_scope_show', ['id' => $scope->getId()])); return $this->redirect($this->generateUrl('admin_scope'));
} }
return $this->render('@ChillMain/Scope/new.html.twig', [ return $this->render('@ChillMain/Scope/new.html.twig', [

View File

@ -319,9 +319,11 @@ class ChillMainExtension extends Extension implements
], ],
'new' => [ 'new' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/UserJob/new.html.twig',
], ],
'edit' => [ 'edit' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/UserJob/edit.html.twig',
], ],
], ],
], ],

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Center edit'|trans }}{% endblock %} {% block title %}{{ 'Center edit'|trans }}{% endblock %}
@ -10,11 +10,11 @@
{{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }} {{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
{{ form_end(edit_form) }} {{ form_end(edit_form) }}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li> <li class='cancel'>
<a href="{{ path('admin_center') }}"> <a href="{{ path('admin_center') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Center list'|trans }}{% endblock %} {% block title %}{{ 'Center list'|trans }}{% endblock %}
@ -15,27 +15,25 @@
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<td><a href="{{ path('admin_center_show', { 'id': entity.id }) }}">{{ entity.name }}</a></td> <td>{{ entity.name }}</td>
<td> <td>
<ul> <ul class="record_actions">
<li> <li>
<a href="{{ path('admin_center_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a> <a href="{{ path('admin_center_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans }}</a>
</li> </li>
<li> </ul>
<a href="{{ path('admin_center_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
</li>
</ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<ul> <ul class="record_actions sticky-form-buttons">
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
<li> <li>
<a href="{{ path('admin_center_new') }}"> <a href="{{ path('admin_center_new') }}" class="btn btn-create">{{ 'Create a new center'|trans }}</a>
{{ 'Create a new center'|trans }}
</a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Center creation'|trans }}{% endblock %} {% block title %}{{ 'Center creation'|trans }}{% endblock %}
@ -10,11 +10,11 @@
{{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }} {{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
{{ form_end(form) }} {{ form_end(form) }}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li> <li class='cancel'>
<a href="{{ path('admin_center') }}"> <a href="{{ path('admin_center') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,29 +0,0 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
{% block title %}{{ 'Centre %name%'|trans({ '%name%': entity.name }) }}{% endblock %}
{% block admin_content -%}
<h1>{{ 'Centre %name%'|trans({ '%name%': entity.name }) }}</h1>
<table class="record_properties">
<tbody>
<tr>
<th>{{ 'Name'|trans }}</th>
<td>{{ entity.name }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('admin_center') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('admin_center_edit', { 'id': entity.id }) }}">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% 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>{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}</h1> <h1>{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}</h1>
<h2>{{ 'Details'|trans }}</h2> <h2>{{ 'Details'|trans }}</h2>
{{ form_start(edit_form) }} {{ form_start(edit_form) }}
{{ form_row(edit_form.name) }} {{ form_row(edit_form.name) }}
{% if edit_form.flags is defined %} {% if edit_form.flags is defined %}
@ -14,28 +14,28 @@
{% endif %} {% endif %}
{{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-chill-green' } } ) }} {{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-chill-green' } } ) }}
{{ form_end(edit_form) }} {{ form_end(edit_form) }}
<h2>{{ 'Grant those permissions'|trans }} :</h2> <h2>{{ 'Grant those permissions'|trans }} :</h2>
{%- if entity.getRoleScopes|length > 0 -%} {%- if entity.getRoleScopes|length > 0 -%}
{% for title, role_scopes in role_scopes_sorted %} {% for title, role_scopes in role_scopes_sorted %}
<h3>{{ title|default("Unclassified")|trans }}</h3> <h3>{{ title|default("Unclassified")|trans }}</h3>
<table class="striped rounded"> <table class="striped rounded">
<thead> <thead>
<tr> <tr>
<th>{{ 'Role'|trans }}</th> <th>{{ 'Role'|trans }}</th>
<th>{{ 'Circle'|trans }}</th> <th>{{ 'Circle'|trans }}</th>
<th>{{ 'Actions'|trans }}</th> <th>{{ 'Actions'|trans }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for role_scope in role_scopes %} {% for role_scope in role_scopes %}
<tr> <tr>
<td> <td>
<span class="role_scope role">{{ role_scope.role|trans }}</span> <span class="role_scope role">{{ role_scope.role|trans }}</span>
{% if expanded_roles[role_scope.role]|length > 1 %} {% if expanded_roles[role_scope.role]|length > 1 %}
<br/> <br/>
<small>{{ 'Which implies'|trans }}&nbsp;: {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small> <small>{{ 'Which implies'|trans }}&nbsp;: {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small>
@ -56,40 +56,40 @@
{{ form_end(delete_role_scopes_form[role_scope.id]) }} {{ form_end(delete_role_scopes_form[role_scope.id]) }}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% endfor %} {% endfor %}
{%- else -%} {%- else -%}
<p>{{ 'This group does not provide any permission'|trans }}</p> <p>{{ 'This group does not provide any permission'|trans }}</p>
{%- endif -%} {%- endif -%}
<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) }}
<ul class="record_actions">
<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-see">{{ 'Cancel'|trans }}</a>
</li>
<li>
<a href="{{ path('admin_permissionsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
{{ form_end(add_role_scopes_form) }}
<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) }}
<ul class="record_actions">
<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_end(add_role_scopes_form) }}
</div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Permissions group list'|trans }}{% endblock %} {% block title %}{{ 'Permissions group list'|trans }}{% endblock %}
@ -15,27 +15,30 @@
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<td><a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}">{{ entity.name }}</a></td> <td>{{ entity.name }}</td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}" class="btn btn-see">{{ 'See'|trans }}</a> <a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}" class="btn btn-show">{{ 'Show'|trans }}</a>
</li> </li>
<li> <li>
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a> <a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
</li> </li>
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
<li> <li>
<a href="{{ path('admin_permissionsgroup_new') }}" class="btn btn-create"> <a href="{{ path('admin_permissionsgroup_new') }}" class="btn btn-create">
{{ 'Create a new permissions group'| trans }} {{ 'Create a new permissions group'| trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'New permission group'|trans }}{% endblock %} {% block title %}{{ 'New permission group'|trans }}{% endblock %}
@ -13,11 +13,11 @@
{{ form_row(form.submit, { 'attr': { 'class': 'btn btn-chill-green' } } ) }} {{ form_row(form.submit, { 'attr': { 'class': 'btn btn-chill-green' } } ) }}
{{ form_end(form) }} {{ form_end(form) }}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li> <li class='cancel'>
<a href="{{ path('admin_permissionsgroup') }}"> <a href="{{ path('admin_permissionsgroup') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Permission group "%name%"'|trans({ '%name%': entity.name }) }}{% endblock %} {% block title %}{{ 'Permission group "%name%"'|trans({ '%name%': entity.name }) }}{% endblock %}
@ -13,9 +13,9 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% if role_scopes_sorted|length > 0 %} {% if role_scopes_sorted|length > 0 %}
<h2>{{ 'Grant those permissions'|trans }}&nbsp;:</h2> <h2>{{ 'Grant those permissions'|trans }}&nbsp;:</h2>
{% for title, role_scopes in role_scopes_sorted %} {% for title, role_scopes in role_scopes_sorted %}
<h3>{{ title|default('Unclassified')|trans }}</h3> <h3>{{ title|default('Unclassified')|trans }}</h3>
<table class="striped rounded"> <table class="striped rounded">
@ -23,14 +23,14 @@
<tr> <tr>
<th>{{ 'Role'|trans }}</th> <th>{{ 'Role'|trans }}</th>
<th>{{ 'Circle'|trans }}</th> <th>{{ 'Circle'|trans }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for role_scope in role_scopes %} {% for role_scope in role_scopes %}
<tr> <tr>
<td> <td>
{{ role_scope.role|trans }} {{ role_scope.role|trans }}
{% if expanded_roles[role_scope.role]|length > 1 %} {% if expanded_roles[role_scope.role]|length > 1 %}
<br/> <br/>
<small>{{ 'Which implies'|trans }}&nbsp;: {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small> <small>{{ 'Which implies'|trans }}&nbsp;: {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small>
@ -47,16 +47,17 @@
</tbody> </tbody>
</table> </table>
{% endfor %} {% endfor %}
{% else %} {% else %}
<p>{{ 'This group does not provide any permission'|trans }}.
<p>{{ 'This group does not provide any permission'|trans }}.
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}"> <a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}">
{{ 'add permissions'|trans|capitalize }}</a></p> {{ 'add permissions'|trans|capitalize }}
</a>
</p>
{% endif %} {% endif %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit"> <a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }} {{ 'Edit'|trans }}

View File

@ -1,20 +1,20 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Circle edit'|trans }}{% endblock %} {% block title %}{{ 'Circle edit'|trans }}{% endblock %}
{% block admin_content -%} {% block admin_content %}
<h1>{{ 'Circle edit'|trans }}</h1> <h1>{{ 'Circle edit'|trans }}</h1>
{{ form_start(edit_form) }} {{ form_start(edit_form) }}
{{ form_row(edit_form.name) }} {{ form_row(edit_form.name) }}
{{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }} {{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
{{ form_end(edit_form) }} {{ form_end(edit_form) }}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li> <li class='cancel'>
<a href="{{ path('admin_scope') }}"> <a href="{{ path('admin_scope') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'List circles'|trans }}{% endblock %} {% block title %}{{ 'List circles'|trans }}{% endblock %}
@ -15,27 +15,25 @@
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<td><a href="{{ path('admin_scope_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td> <td>{{ entity.name|localize_translatable_string }}</td>
<td> <td>
<ul> <ul class="record_actions">
<li> <li>
<a href="{{ path('admin_scope_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a> <a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans }}</a>
</li> </li>
<li> </ul>
<a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
</li>
</ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<ul> <ul class="record_actions sticky-form-buttons">
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
<li> <li>
<a href="{{ path('admin_scope_new') }}"> <a href="{{ path('admin_scope_new') }}" class="btn btn-create">{{ 'Create a new circle'|trans }}</a>
{{ 'Create a new circle'|trans }}
</a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,8 +1,8 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Circle creation'|trans }}{% endblock %} {% block title %}{{ 'Circle creation'|trans }}{% endblock %}
{% block admin_content -%} {% block admin_content %}
<h1>{{ 'Circle creation'|trans }}</h1> <h1>{{ 'Circle creation'|trans }}</h1>
{{ form_start(form) }} {{ form_start(form) }}
@ -10,11 +10,11 @@
{{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }} {{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
{{ form_end(form) }} {{ form_end(form) }}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li> <li class='cancel'>
<a href="{{ path('admin_scope') }}"> <a href="{{ path('admin_scope') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }} {{ 'Back to the list'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -1,29 +0,0 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
{% block title %}{{ 'Circle'|trans }}{% endblock %}
{% block admin_content -%}
<h1>{{ 'Circle'|trans }}</h1>
<table class="record_properties">
<tbody>
<tr>
<th>{{ 'Name'|trans }}</th>
<td>{{ entity.name|localize_translatable_string }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('admin_scope') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}">
{{ 'Edit'| trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block admin_content -%} {% block admin_content -%}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% embed '@ChillMain/CRUD/_edit_content.html.twig' %}

View File

@ -1,4 +1,4 @@
{% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'Edit password for %username%'|trans( { '%username%': entity.username } ) }}{% endblock %} {% block title %}{{ 'Edit password for %username%'|trans( { '%username%': entity.username } ) }}{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block admin_content -%} {% block admin_content %}
<h1>{{"Users"|trans}}</h1> <h1>{{"Users"|trans}}</h1>
{% for entity in entities %} {% for entity in entities %}
@ -60,6 +60,9 @@
{{ chill_pagination(paginator) }} {{ chill_pagination(paginator) }}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
<li> <li>
<a href="{{ path('chill_crud_admin_user_new') }}" class="btn btn-create">{{ 'Create'|trans }}</a> <a href="{{ path('chill_crud_admin_user_new') }}" class="btn btn-create">{{ 'Create'|trans }}</a>
</li> </li>

View File

@ -1,6 +1,6 @@
{% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block admin_content -%} {% block admin_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %} {% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %} {% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %} {% endembed %}

View File

@ -1,8 +1,8 @@
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %} {% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
{% block title %}{{ 'User %username%'|trans({ '%username%': entity.username }) }}{% endblock %} {% block title %}{{ 'User %username%'|trans({ '%username%': entity.username }) }}{% endblock %}
{% block admin_content -%} {% block admin_content %}
<h1>{{ 'User %username%'|trans({ '%username%': entity.username }) }}</h1> <h1>{{ 'User %username%'|trans({ '%username%': entity.username }) }}</h1>
<table class="record_properties"> <table class="record_properties">
@ -23,9 +23,9 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h2>{{ 'Permissions granted'|trans }}</h2> <h2>{{ 'Permissions granted'|trans }}</h2>
{% if entity.groupcenters|length > 0 %} {% if entity.groupcenters|length > 0 %}
<table> <table>
<thead> <thead>
@ -52,7 +52,7 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% else %} {% else %}
<p>{{ 'Any permissions granted to this user'|trans }}. <p>{{ 'Any permissions granted to this user'|trans }}.
<a href="{{ path('admin_user_edit', { 'id': entity.id }) }}"> <a href="{{ path('admin_user_edit', { 'id': entity.id }) }}">

View File

@ -0,0 +1,11 @@
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block admin_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock admin_content %}

View File

@ -1,10 +1,11 @@
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %} {% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %} {% block table_entities_thead_tr %}
<th>id</th> <th>id</th>
<th>label</th> <th>{{ 'label'|trans }}</th>
<th>{{ 'active'|trans }}</th>
<th>&nbsp;</th> <th>&nbsp;</th>
{% endblock %} {% endblock %}
{% block table_entities_tbody %} {% block table_entities_tbody %}
@ -12,6 +13,13 @@
<tr> <tr>
<td>{{ entity.id }}</td> <td>{{ entity.id }}</td>
<td>{{ entity.label|localize_translatable_string }}</td> <td>{{ entity.label|localize_translatable_string }}</td>
<td style="text-align:center;">
{%- if entity.active -%}
<i class="fa fa-check-square-o"></i>
{%- else -%}
<i class="fa fa-square-o"></i>
{%- endif -%}
</td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
@ -20,7 +28,13 @@
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endblock %}
{% block actions_before %}
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
{% endblock %} {% endblock %}
{% endembed %} {% endembed %}
{% endblock content %} {% endblock %}

View File

@ -0,0 +1,11 @@
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
{% block admin_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock admin_content %}

View File

@ -58,8 +58,6 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
'route' => 'chill_crud_admin_user_job_index', 'route' => 'chill_crud_admin_user_job_index',
])->setExtras(['order' => 150]); ])->setExtras(['order' => 150]);
$menu->addChild('Languages and countries') $menu->addChild('Languages and countries')
->setAttribute('class', 'list-group-item-header') ->setAttribute('class', 'list-group-item-header')
->setExtras(['order' => 200, 'header' => true]); ->setExtras(['order' => 200, 'header' => true]);
@ -72,8 +70,6 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
'route' => 'chill_crud_main_country_index', 'route' => 'chill_crud_main_country_index',
])->setExtras(['order' => 220]); ])->setExtras(['order' => 220]);
$menu->addChild('Location and location type') $menu->addChild('Location and location type')
->setAttribute('class', 'list-group-item-header') ->setAttribute('class', 'list-group-item-header')
->setExtras(['order' => 300, 'header' => true]); ->setExtras(['order' => 300, 'header' => true]);
@ -85,7 +81,6 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
$menu->addChild('Location list', [ $menu->addChild('Location list', [
'route' => 'chill_crud_main_location_index', 'route' => 'chill_crud_main_location_index',
])->setExtras(['order' => 320]); ])->setExtras(['order' => 320]);
} }
public static function getMenuIds(): array public static function getMenuIds(): array

View File

@ -2,10 +2,6 @@ admin_center:
path: / path: /
controller: Chill\MainBundle\Controller\CenterController::indexAction controller: Chill\MainBundle\Controller\CenterController::indexAction
admin_center_show:
path: /{id}/show
controller: Chill\MainBundle\Controller\CenterController::showAction
admin_center_new: admin_center_new:
path: /new path: /new
controller: Chill\MainBundle\Controller\CenterController::newAction controller: Chill\MainBundle\Controller\CenterController::newAction

View File

@ -2,10 +2,6 @@ admin_scope:
path: / path: /
controller: Chill\MainBundle\Controller\ScopeController::indexAction controller: Chill\MainBundle\Controller\ScopeController::indexAction
admin_scope_show:
path: /{id}/show
controller: Chill\MainBundle\Controller\ScopeController::showAction
admin_scope_new: admin_scope_new:
path: /new path: /new
controller: Chill\MainBundle\Controller\ScopeController::newAction controller: Chill\MainBundle\Controller\ScopeController::newAction

View File

@ -121,6 +121,9 @@ Actions: Actions
Users and permissions: Utilisateurs et permissions Users and permissions: Utilisateurs et permissions
Location and location type: Localisations et types de localisation Location and location type: Localisations et types de localisation
Back to the admin: Menu d'administration Back to the admin: Menu d'administration
"Administration interface": Interface d'administration
Welcome to the admin section !: >
Bienvenue dans l'interface d'administration !
#permissions #permissions
Permissions Menu: Gestion des droits Permissions Menu: Gestion des droits
@ -130,11 +133,6 @@ Permissions management of your chill installation: Gestion des permissions de vo
Location Menu: Localisations et types de localisation Location Menu: Localisations et types de localisation
Management of location: Gestion des localisations et types de localisation Management of location: Gestion des localisations et types de localisation
#admin section
"Administration interface": Interface d'administration
Welcome to the admin section !: >
Bienvenue dans l'interface d'administration !
#admin section for center's administration #admin section for center's administration
Create a new center: Créer un nouveau centre Create a new center: Créer un nouveau centre
Center list: Liste des centres Center list: Liste des centres
@ -150,7 +148,7 @@ Permission group "%name%": Groupe de permissions "%name%"
Grant those permissions: Attribue ces permissions Grant those permissions: Attribue ces permissions
Which implies: Ce qui implique Which implies: Ce qui implique
Permission group: Groupe de permissions Permission group: Groupe de permissions
Permissionsgroup: Group de permissions Permissionsgroup: Groupe de permissions
New permission group: Nouveau groupe de permissions New permission group: Nouveau groupe de permissions
PermissionsGroup "%name%" edit: Modification du groupe de permission '%name%' PermissionsGroup "%name%" edit: Modification du groupe de permission '%name%'
Role: Rôle Role: Rôle
@ -159,6 +157,7 @@ Add permission: Ajouter les permissions
This group does not provide any permission: Ce groupe n'attribue aucune permission This group does not provide any permission: Ce groupe n'attribue aucune permission
The role '%role%' has been removed: Le rôle "%role%" a été enlevé de ce groupe de permission The role '%role%' has been removed: Le rôle "%role%" a été enlevé de ce groupe de permission
The role '%role%' on circle '%scope%' has been removed: Le rôle "%role%" sur le cercle "%scope%" a été enlevé de ce groupe de permission The role '%role%' on circle '%scope%' has been removed: Le rôle "%role%" sur le cercle "%scope%" a été enlevé de ce groupe de permission
Unclassified: Non classifié
#admin section for users #admin section for users
User edit: Modification d'un utilisateur User edit: Modification d'un utilisateur
@ -182,6 +181,14 @@ Change password: Changer le mot de passe
Back to the user edition: Retour au formulaire d'édition Back to the user edition: Retour au formulaire d'édition
Password successfully updated!: Mot de passe mis à jour Password successfully updated!: Mot de passe mis à jour
Flags: Drapeaux Flags: Drapeaux
Main location: Localisation principale
Main scope: Cercle
Main center: Centre
user job: Métier de l'utilisateur
Choose a main center: Choisir un centre
Choose a main scope: Choisir un cercle
choose a job: Choisir un métier
choose a location: Choisir une localisation
# admin section for users jobs # admin section for users jobs
User jobs: Métiers User jobs: Métiers
@ -345,6 +352,8 @@ crud:
index: index:
title: Utilisateurs title: Utilisateurs
add_new: Créer add_new: Créer
title_edit: Modifier un utilisateur
title_new: Créer un utilisateur
admin_user_job: admin_user_job:
index: index:
title: Métiers title: Métiers