improve ux in admin configuration interface

This commit is contained in:
Mathieu Jaumotte 2021-02-06 13:51:46 +01:00
parent 5c9e88784f
commit a1fc070bf7
11 changed files with 76 additions and 17 deletions

View File

@ -18,7 +18,14 @@ class AdminController extends AbstractController
*/
public function indexAction($_locale)
{
return $this->render('ChillPersonBundle:Admin:index.html.twig', []);
return $this->render('ChillPersonBundle:Admin:layout.html.twig', []);
}
/**
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
public function redirectToAdminIndexAction()
{
return $this->redirectToRoute('chill_main_admin_central');
}
}

View File

@ -19,10 +19,12 @@
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
{% block vertical_menu_content %}
{{ chill_menu('admin_person') }}
{{ chill_menu('admin_person', {
'layout': '@ChillPerson/Admin/menu.html.twig',
}) }}
{% endblock %}
{% block admin_content %}
{% block layout_wvm_content %}
<div class="grid-12 centered">
<h1>{{ 'Configuration of person bundle' |trans }}</h1>

View File

@ -0,0 +1,21 @@
{#
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
<info@champs-libres.coop> / <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
{% block v_menu_title %}{{ 'Configuration of person bundle'|trans }}{% endblock %}

View File

@ -1,10 +1,10 @@
{% extends '@ChillMain/Admin/layout.html.twig' %}
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block admin_content %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillMain/Admin/layout.html.twig' %}
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block admin_content %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %}
<th>{{ 'Ordering'|trans }}</th>

View File

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

View File

@ -1,10 +1,10 @@
{% extends '@ChillMain/Admin/layout.html.twig' %}
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block admin_content %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillMain/Admin/layout.html.twig' %}
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block admin_content %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th>

View File

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

View File

@ -87,4 +87,31 @@ chill_person_timeline:
chill_person_admin:
path: "/{_locale}/admin/person"
controller: Chill\PersonBundle\Controller\AdminController::indexAction
controller: Chill\PersonBundle\Controller\AdminController::indexAction
chill_person_admin_redirect_to_admin_index:
path: /{_locale}/admin/person_redirect_to_main
controller: Chill\PersonBundle\Controller\AdminController::redirectToAdminIndexAction
options:
menus:
admin_person:
order: 0
label: Main admin menu
chill_person_closingmotive_admin:
path: /{_locale}/admin/closing-motive
controller: cscrud_closing_motive_controller:index
options:
menus:
admin_person:
order: 90
label: 'person_admin.closing motives'
chill_person_maritalstatus_admin:
path: /{_locale}/admin/marital-status
controller: cscrud_marital_status_controller:index
options:
menus:
admin_person:
order: 120
label: 'person_admin.marital status'

View File

@ -244,10 +244,12 @@ closing_motive:
Configuration of person bundle: Configuration du module "Personnes"
person_admin:
What would you like to configure ?: Que souhaitez-vous configurer ?
closing motives: Motifs de clotûre
closing motives list: Liste des motifs de clotûre
closing motive explanation: >
Les motifs de clotûre donnent des indications sur la fermeture
d'une période d'accompagnement.
marital status: États civils
marital status list: Liste des états civils
marital status explanation: >
Configurer la liste des états civils.