entry added to section menu and redirection to normal chill homepage

This commit is contained in:
Julie Lenaerts 2022-03-10 14:53:46 +01:00
parent 0fc3c2eb1f
commit a3c5cabc9a
2 changed files with 11 additions and 4 deletions

View File

@ -20,10 +20,6 @@ class DefaultController extends AbstractController
{
public function indexAction()
{
if ($this->isGranted('ROLE_ADMIN')) {
return $this->redirectToRoute('chill_main_admin_central', [], 302);
}
return $this->render('@ChillMain/layout.html.twig');
}

View File

@ -45,6 +45,16 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
'order' => 0,
]);
if ($this->authorizationChecker->isGranted('ROLE_ADMIN')) {
$menu->addChild($this->translator->trans('Administration'), [
'route' => 'chill_main_admin_central',
])
->setExtras([
'icons' => ['home'],
'order' => 5,
]);
}
$menu->addChild($this->translator->trans('Global timeline'), [
'route' => 'chill_center_timeline',
])
@ -54,6 +64,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
]
);
if ($this->authorizationChecker->isGranted(ChillExportVoter::EXPORT)) {
$menu->addChild($this->translator->trans('Export Menu'), [
'route' => 'chill_main_export_index',