mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
app navigation external config (#60)
This commit is contained in:
parent
5e228fa62d
commit
c7f7fbdaa9
@ -20,6 +20,66 @@
|
|||||||
".git"
|
".git"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"navigation": {
|
||||||
|
"main": [
|
||||||
|
{
|
||||||
|
"icon": "folder",
|
||||||
|
"label": "APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL",
|
||||||
|
"title": "APP.BROWSE.PERSONAL.SIDENAV_LINK.TOOLTIP",
|
||||||
|
"disabled": false,
|
||||||
|
"route": {
|
||||||
|
"url": "/personal-files"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "group_work",
|
||||||
|
"label": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
|
||||||
|
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
|
||||||
|
"disabled": false,
|
||||||
|
"route": {
|
||||||
|
"url": "/libraries"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"secondary": [
|
||||||
|
{
|
||||||
|
"icon": "people",
|
||||||
|
"label": "APP.BROWSE.SHARED.SIDENAV_LINK.LABEL",
|
||||||
|
"title": "APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP",
|
||||||
|
"disabled": false,
|
||||||
|
"route": {
|
||||||
|
"url": "/shared"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "schedule",
|
||||||
|
"label": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
|
||||||
|
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
|
||||||
|
"disabled": false,
|
||||||
|
"route": {
|
||||||
|
"url": "/recent-files"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "star",
|
||||||
|
"label": "APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL",
|
||||||
|
"title": "APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP",
|
||||||
|
"disabled": false,
|
||||||
|
"route": {
|
||||||
|
"url": "/favorites"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "delete",
|
||||||
|
"label": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL",
|
||||||
|
"title": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP",
|
||||||
|
"disabled": false,
|
||||||
|
"route": {
|
||||||
|
"url": "/trashcan"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"key": "de",
|
"key": "de",
|
||||||
|
@ -20,7 +20,7 @@ import { Subscription } from 'rxjs/Rx';
|
|||||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
|
|
||||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
import { AlfrescoContentService, AppConfigService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { BrowsingFilesService } from '../../common/services/browsing-files.service';
|
import { BrowsingFilesService } from '../../common/services/browsing-files.service';
|
||||||
|
|
||||||
@ -32,60 +32,18 @@ import { BrowsingFilesService } from '../../common/services/browsing-files.servi
|
|||||||
export class SidenavComponent implements OnInit, OnDestroy {
|
export class SidenavComponent implements OnInit, OnDestroy {
|
||||||
node: MinimalNodeEntryEntity = null;
|
node: MinimalNodeEntryEntity = null;
|
||||||
onChangeParentSubscription: Subscription;
|
onChangeParentSubscription: Subscription;
|
||||||
|
navigation = [];
|
||||||
navigation = [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
icon: 'folder',
|
|
||||||
label: 'APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL',
|
|
||||||
title: 'APP.BROWSE.PERSONAL.SIDENAV_LINK.TOOLTIP',
|
|
||||||
disabled: false,
|
|
||||||
route: { url: '/personal-files' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'group_work',
|
|
||||||
label: 'APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL',
|
|
||||||
title: 'APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP',
|
|
||||||
disabled: false,
|
|
||||||
route: { url: '/libraries' }
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
icon: 'people',
|
|
||||||
label: 'APP.BROWSE.SHARED.SIDENAV_LINK.LABEL',
|
|
||||||
title: 'APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP',
|
|
||||||
disabled: false,
|
|
||||||
route: { url: '/shared' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'schedule',
|
|
||||||
label: 'APP.BROWSE.RECENT.SIDENAV_LINK.LABEL',
|
|
||||||
title: 'APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP',
|
|
||||||
disabled: false,
|
|
||||||
route: { url: '/recent-files' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'star',
|
|
||||||
label: 'APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL',
|
|
||||||
title: 'APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP',
|
|
||||||
disabled: false,
|
|
||||||
route: { url: '/favorites' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'delete',
|
|
||||||
label: 'APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL',
|
|
||||||
title: 'APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP',
|
|
||||||
disabled: false,
|
|
||||||
route: { url: '/trashcan' }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private browsingFilesService: BrowsingFilesService,
|
private browsingFilesService: BrowsingFilesService,
|
||||||
private contentService: AlfrescoContentService
|
private contentService: AlfrescoContentService,
|
||||||
) {}
|
private appConfig: AppConfigService
|
||||||
|
) {
|
||||||
|
this.navigation = this.navigation.concat([
|
||||||
|
this.appConfig.get('navigation.main'),
|
||||||
|
this.appConfig.get('navigation.secondary')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.onChangeParentSubscription = this.browsingFilesService.onChangeParent
|
this.onChangeParentSubscription = this.browsingFilesService.onChangeParent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user