From 16d74eaa0c75d49eec564a16bf8fcc209cdb1f84 Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 4 May 2022 17:34:44 +0200 Subject: [PATCH] admin: reorganize twig templates and admin menu --- .../Controller/AdminController.php | 15 ---- .../Resources/public/chill/chillmain.scss | 5 +- .../views/Admin/Civility/index.html.twig | 12 ++- .../views/Admin/Language/index.html.twig | 13 +++- .../Resources/views/Admin/index.html.twig | 4 - .../Resources/views/Admin/layout.html.twig | 7 -- .../Admin/layoutWithVerticalMenu.html.twig | 7 +- .../Admin/layout_language_country.html.twig | 33 --------- .../views/Admin/layout_location.html.twig | 33 --------- .../views/Admin/layout_permissions.html.twig | 31 -------- .../views/Admin/menu_admin_index.html.twig | 18 ----- .../menu_admin_language_country.html.twig | 20 ----- .../views/Admin/menu_admin_location.html.twig | 20 ----- .../Admin/menu_admin_permissions.html.twig | 20 ----- .../views/Admin/menu_admin_section.html.twig | 67 +++++++---------- .../views/CRUD/Admin/index.html.twig | 11 ++- .../MenuBuilder/AdminSectionMenuBuilder.php | 74 +++++++++++++------ .../LanguageCountryMenuBuilder.php | 33 --------- .../MenuBuilder/LocationMenuBuilder.php | 33 --------- .../MenuBuilder/PermissionMenuBuilder.php | 47 ------------ src/Bundle/ChillMainBundle/config/routes.yaml | 11 --- .../translations/messages.fr.yml | 1 + 22 files changed, 112 insertions(+), 403 deletions(-) delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/layout_language_country.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/layout_location.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/layout_permissions.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_index.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_language_country.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_location.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_permissions.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php delete mode 100644 src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php delete mode 100644 src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php diff --git a/src/Bundle/ChillMainBundle/Controller/AdminController.php b/src/Bundle/ChillMainBundle/Controller/AdminController.php index 2055f0f22..de4420f68 100644 --- a/src/Bundle/ChillMainBundle/Controller/AdminController.php +++ b/src/Bundle/ChillMainBundle/Controller/AdminController.php @@ -23,19 +23,4 @@ class AdminController extends AbstractController { return $this->render('@ChillMain/Admin/index.html.twig'); } - - public function indexLanguageCountryAction() - { - return $this->render('@ChillMain/Admin/layout_language_country.html.twig'); - } - - public function indexLocationsAction() - { - return $this->render('@ChillMain/Admin/layout_location.html.twig'); - } - - public function indexPermissionsAction() - { - return $this->render('@ChillMain/Admin/layout_permissions.html.twig'); - } } diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss index e4cdcb10c..94bc520cb 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss @@ -179,7 +179,7 @@ div.banner { div.vertical-menu { border-radius: 0; margin-top: 0.5rem; - a.list-group-item { + a.list-group-item, div.list-group-item { background-color: $chill-yellow; border: 0; margin-bottom: 0.25rem; @@ -187,6 +187,9 @@ div.vertical-menu { background-color: tint-color($chill-yellow, 20%) } } + div.list-group-item-header { + text-transform: uppercase; + } } footer.footer { diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/index.html.twig index 278f53ba2..9d28d3339 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/index.html.twig @@ -1,6 +1,7 @@ {% extends '@ChillMain/CRUD/Admin/index.html.twig' %} -{% block content %} + +{% block admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} id @@ -28,6 +29,11 @@ {% endfor %} {% endblock %} - {% endembed %} -{% endblock content %} + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/index.html.twig index 92e9ce8f5..21d2afca9 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/index.html.twig @@ -1,12 +1,13 @@ {% extends '@ChillMain/CRUD/Admin/index.html.twig' %} -{% block content %} +{% block admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} id name   {% endblock %} + {% block table_entities_tbody %} {% for entity in entities %} @@ -22,6 +23,12 @@ {% endfor %} {% endblock %} - {% endembed %} -{% endblock content %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/index.html.twig index 11d5cc3c9..ba17f1d84 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/index.html.twig @@ -8,8 +8,4 @@

    {{ 'Welcome to the admin section !'|trans }}

    - {{ chill_menu('admin_index', { - 'layout': '@ChillMain/Admin/menu_admin_index.html.twig' - }) }} - {% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/layout.html.twig index 0107bba4e..01ba8ca58 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/layout.html.twig @@ -1,12 +1,5 @@ {% extends "@ChillMain/layout.html.twig" %} -{% block navigation_search_bar %}{% endblock %} -{% block navigation_section_menu %} - {{ chill_menu('admin_section', { - 'layout': '@ChillMain/Menu/admin.html.twig', - }) }} -{% endblock %} - {% block content %} {% block admin_content %}
    diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig index 9a57b9067..900a794b6 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig @@ -1,14 +1,13 @@ {% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %} -{% block navigation_search_bar %}{% endblock %} -{% block navigation_section_menu %} - {{ chill_menu('admin_section', { +{% block vertical_menu_content %} + {{ chill_menu('admin_section', { 'layout': '@ChillMain/Admin/menu_admin_section.html.twig', }) }} {% endblock %} {% block layout_wvm_content %} {% block admin_content %} - + {% endblock %} {% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_language_country.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_language_country.html.twig deleted file mode 100644 index b76e60861..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_language_country.html.twig +++ /dev/null @@ -1,33 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} - -{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %} - -{% block vertical_menu_content %} - {{ chill_menu('admin_language_country', { - 'layout': '@ChillMain/Admin/menu_admin_language_country.html.twig', - }) }} -{% endblock %} - - - -{% block layout_wvm_content %} - {% block admin_content %} -

    {{ 'Management of languages and countries' |trans }}

    - {% endblock %} -{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_location.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_location.html.twig deleted file mode 100644 index fc0708af9..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_location.html.twig +++ /dev/null @@ -1,33 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} - -{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %} - -{% block vertical_menu_content %} - {{ chill_menu('admin_location', { - 'layout': '@ChillMain/Admin/menu_admin_location.html.twig', - }) }} -{% endblock %} - - - -{% block layout_wvm_content %} - {% block admin_content %} -

    {{ 'Management of location' |trans }}

    - {% endblock %} -{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_permissions.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_permissions.html.twig deleted file mode 100644 index 55883069f..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/layout_permissions.html.twig +++ /dev/null @@ -1,31 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} - -{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %} - -{% block vertical_menu_content %} - {{ chill_menu('admin_permissions', { - 'layout': '@ChillMain/Admin/menu_admin_permissions.html.twig', - }) }} -{% endblock %} - -{% block layout_wvm_content %} - {% block admin_content %} -

    {{ 'Permissions management of your chill installation' |trans }}

    - {% endblock %} -{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_index.html.twig deleted file mode 100644 index b766b6440..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_index.html.twig +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_language_country.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_language_country.html.twig deleted file mode 100644 index e6b4fa5fe..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_language_country.html.twig +++ /dev/null @@ -1,20 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} - -{% extends "@ChillMain/Menu/verticalMenu.html.twig" %} -{% block v_menu_title %}{{ 'Language and countries menu'|trans }}{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_location.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_location.html.twig deleted file mode 100644 index b4112ff60..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_location.html.twig +++ /dev/null @@ -1,20 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} - -{% extends "@ChillMain/Menu/verticalMenu.html.twig" %} -{% block v_menu_title %}{{ 'Location Menu'|trans }}{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_permissions.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_permissions.html.twig deleted file mode 100644 index 77032edca..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_permissions.html.twig +++ /dev/null @@ -1,20 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} - -{% extends "@ChillMain/Menu/verticalMenu.html.twig" %} -{% block v_menu_title %}{{ 'Permissions Menu'|trans }}{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_section.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_section.html.twig index 7fabd0ae9..d0c777a4e 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_section.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/menu_admin_section.html.twig @@ -1,41 +1,28 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * 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 . -#} +
    + {% for menu in menus %} + {% if 'header' in menu.extras %} + + {% else %} + + {{ menu.label|trans }} + {% apply spaceless %} + {% if menu.extras.icons is defined %} + {% for icon in menu.extras.icons %} + + {% endfor %} + {% endif %} + {% endapply %} + + {% endif %} - + {% endfor %} +
    diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/Admin/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/Admin/index.html.twig index 1dc0acc81..d410abcea 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/Admin/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/Admin/index.html.twig @@ -1,8 +1,13 @@ -{% extends '@ChillMain/Admin/layout.html.twig' %} +{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %} {% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %} -{% block content %} +{% block admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} {% endembed %} -{% endblock content %} +{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php index b1326a85b..b21f83846 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php @@ -34,32 +34,58 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface return; } - $menu->addChild('Users and permissions', [ - 'route' => 'chill_main_admin_permissions', - ]) - ->setExtras([ - 'icons' => ['key'], - 'order' => 200, - 'explain' => 'Configure permissions for users', - ]); + $menu->addChild('Users and permissions') + ->setAttribute('class', 'list-group-item-header') + ->setExtras(['order' => 100, 'header' => true]); - $menu->addChild('Location and location type', [ - 'route' => 'chill_main_admin_locations', - ]) - ->setExtras([ - 'icons' => ['key'], - 'order' => 205, - 'explain' => 'Configure location and location type', - ]); + $menu->addChild('Center list', [ + 'route' => 'admin_center', + ])->setExtras(['order' => 110]); + + $menu->addChild('List circles', [ + 'route' => 'admin_scope', + ])->setExtras(['order' => 120]); + + $menu->addChild('Permissions group list', [ + 'route' => 'admin_permissionsgroup', + ])->setExtras(['order' => 130]); + + $menu->addChild('crud.admin_user.index.title', [ + 'route' => 'chill_crud_admin_user_index', + ])->setExtras(['order' => 140]); + + $menu->addChild('User jobs', [ + 'route' => 'chill_crud_admin_user_job_index', + ])->setExtras(['order' => 150]); + + + + $menu->addChild('Languages and countries') + ->setAttribute('class', 'list-group-item-header') + ->setExtras(['order' => 200, 'header' => 'true']); + + $menu->addChild('Language list', [ + 'route' => 'chill_crud_main_language_index', + ])->setExtras(['order' => 210]); + + $menu->addChild('Country list', [ + 'route' => 'chill_crud_main_country_index', + ])->setExtras(['order' => 220]); + + + + $menu->addChild('Location and location type') + ->setAttribute('class', 'list-group-item-header') + ->setExtras(['order' => 300, 'header' => 'true']); + + $menu->addChild('Location type list', [ + 'route' => 'chill_crud_main_location_type_index', + ])->setExtras(['order' => 310]); + + $menu->addChild('Location list', [ + 'route' => 'chill_crud_main_location_index', + ])->setExtras(['order' => 320]); - $menu->addChild('Languages and countries', [ - 'route' => 'chill_main_admin_language_country', - ]) - ->setExtras([ - 'icons' => ['key'], - 'order' => 210, - 'explain' => 'Configure languages and countries', - ]); } public static function getMenuIds(): array diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php deleted file mode 100644 index 540f1344e..000000000 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php +++ /dev/null @@ -1,33 +0,0 @@ -addChild('Language list', [ - 'route' => 'chill_crud_main_language_index', - ])->setExtras(['order' => 205]); - - $menu->addChild('Country list', [ - 'route' => 'chill_crud_main_country_index', - ])->setExtras(['order' => 206]); - } - - public static function getMenuIds(): array - { - return ['admin_language_country']; - } -} diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php deleted file mode 100644 index da1ce479b..000000000 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LocationMenuBuilder.php +++ /dev/null @@ -1,33 +0,0 @@ -addChild('Location type list', [ - 'route' => 'chill_crud_main_location_type_index', - ])->setExtras(['order' => 205]); - - $menu->addChild('Location list', [ - 'route' => 'chill_crud_main_location_index', - ])->setExtras(['order' => 206]); - } - - public static function getMenuIds(): array - { - return ['admin_location']; - } -} diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php deleted file mode 100644 index 6fab6b635..000000000 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/PermissionMenuBuilder.php +++ /dev/null @@ -1,47 +0,0 @@ -addChild('Permissions group list', [ - 'route' => 'admin_permissionsgroup', - ])->setExtras([ - 'order' => 300, - ]); - - $menu->addChild('crud.admin_user.index.title', [ - 'route' => 'chill_crud_admin_user_index', - ])->setExtras(['order' => 400]); - - $menu->addChild('List circles', [ - 'route' => 'admin_scope', - ])->setExtras(['order' => 200]); - - $menu->addChild('Center list', [ - 'route' => 'admin_center', - ])->setExtras(['order' => 100]); - - $menu->addChild('User jobs', [ - 'route' => 'chill_crud_admin_user_job_index', - ])->setExtras(['order' => 150]); - } - - public static function getMenuIds(): array - { - return ['admin_permissions']; - } -} diff --git a/src/Bundle/ChillMainBundle/config/routes.yaml b/src/Bundle/ChillMainBundle/config/routes.yaml index b0ee2c956..d25f2aaff 100644 --- a/src/Bundle/ChillMainBundle/config/routes.yaml +++ b/src/Bundle/ChillMainBundle/config/routes.yaml @@ -62,17 +62,6 @@ chill_main_homepage: # order: 0 # label: Main admin menu # -chill_main_admin_permissions: - path: /{_locale}/admin/permissions - controller: Chill\MainBundle\Controller\AdminController::indexPermissionsAction - -chill_main_admin_locations: - path: /{_locale}/admin/locations - controller: Chill\MainBundle\Controller\AdminController::indexLocationsAction - -chill_main_admin_language_country: - path: /{_locale}/admin/language-country - controller: Chill\MainBundle\Controller\AdminController::indexLanguageCountryAction chill_main_search: path: /{_locale}/search.{_format} diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index f23fa7382..e679db535 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -120,6 +120,7 @@ Main admin menu: Menu d'administration principal Actions: Actions Users and permissions: Utilisateurs et permissions Location and location type: Localisations et types de localisation +Back to the admin: Retour #permissions Permissions Menu: Gestion des droits