From 41444f415772b471afc24da9cc0d0656192564f4 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 5 Feb 2021 22:49:00 +0100 Subject: [PATCH] admin area, configuration menu --- Controller/AdminController.php | 11 +++++++++++ Resources/views/EventType/index.html.twig | 2 +- config/routes.yaml | 11 ++++++++++- translations/messages.fr.yml | 6 +++--- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Controller/AdminController.php b/Controller/AdminController.php index 182588398..c55fd172d 100644 --- a/Controller/AdminController.php +++ b/Controller/AdminController.php @@ -30,8 +30,19 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; */ class AdminController extends AbstractController { + /** + * @return \Symfony\Component\HttpFoundation\Response + */ public function indexAction() { return $this->render('ChillEventBundle:Admin:layout.html.twig'); } + + /** + * @return \Symfony\Component\HttpFoundation\RedirectResponse + */ + public function redirectToAdminIndexAction() + { + return $this->redirectToRoute('chill_main_admin_central'); + } } \ No newline at end of file diff --git a/Resources/views/EventType/index.html.twig b/Resources/views/EventType/index.html.twig index 40fed7220..f1b2f9acd 100644 --- a/Resources/views/EventType/index.html.twig +++ b/Resources/views/EventType/index.html.twig @@ -8,7 +8,7 @@ {{ 'Id'|trans }} - {{ 'Label'|trans }} + {{ 'Type'|trans }} {{ 'Active'|trans }} {{ 'Actions'|trans }} diff --git a/config/routes.yaml b/config/routes.yaml index 65ae15ed0..623f34d28 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -15,10 +15,19 @@ chill_event_admin: options: menus: admin_section: - order: 1000 + order: 2100 label: "Events configuration" icons: ['calendar'] +chill_event_admin_redirect_to_admin_index: + path: /{_locale}/admin/event_redirect_to_main + controller: Chill\EventBundle\Controller\AdminController::redirectToAdminIndexAction + options: + menus: + admin_events: + order: 0 + label: Main admin menu + chill_event_admin_status: resource: "@ChillEventBundle/config/routes/status.yaml" prefix: /{_locale}/admin/event/status diff --git a/translations/messages.fr.yml b/translations/messages.fr.yml index 45248c4df..d684f2c5b 100644 --- a/translations/messages.fr.yml +++ b/translations/messages.fr.yml @@ -84,10 +84,10 @@ Select a format: Choisir un format Export: Exporter -Events configuration: Événements +Events configuration: Config des événements Events configuration menu: Menu des événements -Event status: Statuts -Event roles: Rôles +Event status: Statuts par type d'événement +Event roles: Rôles par type d'événement Event types: Types d'événements EventType list: Liste des types d'événements EventType: Types d'événements