Commit 3d3ad005 authored by Matija Obreza's avatar Matija Obreza
Browse files

Navigation: included /, /admin, /dashboard in side navigation

parent f5f03f55
......@@ -7,6 +7,16 @@ import renderRoutes from 'ui/renderRoutes';
import TopNavigation from './headers/v1/NavigationBar';
const ADMIN_MENUS = [
{
to: '/',
label: 'public.menu.home',
inHeader: false,
},
{
to: '/admin',
label: 'common.menu.Admin',
inHeader: false,
},
{
to: '/admin/users',
label: 'admin.menu.userManagement',
......
......@@ -5,6 +5,16 @@ import renderRoutes from 'ui/renderRoutes';
import TopNavigation from './headers/v1/NavigationBar';
const DASHBOARD_MENUS = [
{
to: '/',
label: 'public.menu.home',
inHeader: false,
},
{
to: '/dashboard',
label: 'common.menu.My Dashboard',
inHeader: false,
},
{
to: '/dashboard/profile',
label: 'user.dashboard.menu.profile',
......
......@@ -28,6 +28,7 @@ class MenuBar extends React.Component<IMenuBarProps, any> {
private renderMenu = (path: any) => {
const { t, location, theme } = this.props;
// console.log(`P ${path.to} inHeader=${path.inHeader}`, path.inHeader !== undefined && ! path.inHeader);
return (
path.subMenus ? (
<MenuItem
......@@ -39,7 +40,7 @@ class MenuBar extends React.Component<IMenuBarProps, any> {
children={ path.subMenus.map(this.renderSubMenu) }
theme={ theme }
/>
) : (
) : (path.inHeader !== undefined && ! path.inHeader) ? null : (
<MenuItem
root
label={ typeof path.label === 'string' ? t(path.label) : path.label }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment