Adds Admin pages on the side nav menu. (Ticket #85)

This commit is contained in:
gkolokythas 2019-05-20 10:32:01 +03:00
parent 392eb0d36e
commit 2775841d84
3 changed files with 20 additions and 3 deletions

View File

@ -61,7 +61,7 @@ const appRoutes: Routes = [
}
},
{
path: 'dmp-profiles',
path: 'dmp-templates',
loadChildren: './ui/admin/dmp-profile/dmp-profile.module#DmpProfileModule',
data: {
breadcrumb: true
@ -75,7 +75,7 @@ const appRoutes: Routes = [
}
},
{
path: 'dataset-profiles',
path: 'dataset-templates',
loadChildren: './ui/admin/dataset-profile/dataset-profile.module#DatasetProfileModule',
data: {
breadcrumb: true

View File

@ -23,6 +23,11 @@ export const DMP_ROUTES: RouteInfo[] = [
{ path: '/datasets', title: 'SIDE-BAR.MY-DATASET-DESC', icon: 'library_books' },
{ path: '/projects', title: 'SIDE-BAR.MY-PROJECTS', icon: 'work_outline' }
];
export const ADMIN_ROUTES: RouteInfo[] = [
{ path: '/dmp-templates', title: 'SIDE-BAR.DMP-TEMPLATES', icon: 'library_books' },
{ path: '/dataset-templates', title: 'SIDE-BAR.DATASET-TEMPLATES', icon: 'library_books' },
{ path: '/users', title: 'SIDE-BAR.USERS', icon: 'people' }
];
// export const HISTORY_ROUTES: RouteInfo[] = [
// { path: '/typography', title: 'SIDE-BAR.HISTORY-VISITED', icon: 'visibility'},
// { path: '/icons', title: 'SIDE-BAR.HISTORY-EDITED', icon: 'edit'}
@ -40,6 +45,7 @@ export const PUBLIC_ROUTES: RouteInfo[] = [
export class SidebarComponent implements OnInit {
generalItems: GroupMenuItem;
dmpItems: GroupMenuItem;
adminItems: GroupMenuItem;
// historyItems: GroupMenuItem;
publicItems: GroupMenuItem;
groupMenuItems: GroupMenuItem[] = [];
@ -61,6 +67,13 @@ export class SidebarComponent implements OnInit {
}
this.groupMenuItems.push(this.dmpItems);
this.adminItems = {
title: 'SIDE-BAR.ADMIN',
routes: ADMIN_ROUTES,
requiresAuthentication: true
}
this.groupMenuItems.push(this.adminItems);
// this.historyItems = {
// title: 'SIDE-BAR.HISTORY',
// routes: HISTORY_ROUTES

View File

@ -69,7 +69,11 @@
"PUBLIC": "PUBLIC",
"PUBLIC-DMPS": "PUBLIC DMPs",
"PUBLIC-DESC": "PUBLIC DATASET DESCRIPTIONS",
"ACCOUNT": "ACCOUNT"
"ACCOUNT": "ACCOUNT",
"ADMIN": "ADMIN",
"DATASET-TEMPLATES": "Dataset templates",
"DMP-TEMPLATES": "DMP templates",
"USERS": "Users"
},
"DATASET-PROFILE-EDITOR": {
"TITLE": {