From 1a764025e1b92151c00f611f9933fa9d83360ce6 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 9 May 2022 17:14:25 +0200 Subject: [PATCH] admin: admin section for thirdparty --- .../Controller/AdminController.php | 29 +++++++++++++++++++ .../Menu/AdminMenuBuilder.php | 6 ++-- .../Resources/views/Admin/index.html.twig | 13 +++++++++ .../Resources/views/Admin/menu.html.twig | 2 ++ .../translations/messages.fr.yml | 2 ++ 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php create mode 100644 src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/index.html.twig create mode 100644 src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/menu.html.twig diff --git a/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php b/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php new file mode 100644 index 000000000..031227159 --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php @@ -0,0 +1,29 @@ +render('ChillThirdPartyBundle:Admin:index.html.twig'); + } + +} \ No newline at end of file diff --git a/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php index ec44d8339..170cc3918 100644 --- a/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php @@ -33,7 +33,9 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface return; } - $menu->addChild('Third party') + $menu->addChild('Third party', [ + 'route' => 'chill_thirdparty_admin_index', + ]) ->setAttribute('class', 'list-group-item-header') ->setExtras(['order' => 3000, 'header' => true]); @@ -44,6 +46,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface public static function getMenuIds(): array { - return ['admin_section']; + return ['admin_section', 'admin_thirdparty']; } } diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/index.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/index.html.twig new file mode 100644 index 000000000..4511d722e --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/index.html.twig @@ -0,0 +1,13 @@ +{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %} + +{% block vertical_menu_content %} + {{ chill_menu('admin_thirdparty', { + 'layout': '@ChillThirdParty/Admin/menu.html.twig', + }) }} +{% endblock %} + +{% block layout_wvm_content %} + {% block admin_content %} +

{{ 'Third party configuration' |trans }}

+ {% endblock %} +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/menu.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/menu.html.twig new file mode 100644 index 000000000..3a534b81f --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Admin/menu.html.twig @@ -0,0 +1,2 @@ +{% extends "@ChillMain/Menu/verticalMenu.html.twig" %} +{% block v_menu_title %}{{ 'Third party configuration'|trans }}{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml index 8c2a9d856..0ea68c8e8 100644 --- a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml @@ -80,6 +80,8 @@ Thirdparty handling: Tiers traitant Thirdparty workers: Tiers intervenants Third party category: Catégories de tiers +Third party configuration: Gestion des tiers + # ROLES CHILL_3PARTY_3PARTY_CREATE: Ajouter un Tiers CHILL_3PARTY_3PARTY_SHOW: Voir un Tiers