mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
68067: Add menu sections through route data
This commit is contained in:
@@ -18,6 +18,7 @@ import { TextMenuItemModel } from '../../shared/menu/menu-item/models/text.model
|
||||
import { MenuComponent } from '../../shared/menu/menu.component';
|
||||
import { MenuService } from '../../shared/menu/menu.service';
|
||||
import { CSSVariableService } from '../../shared/sass-helper/sass-helper.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/**
|
||||
* Component representing the admin sidebar
|
||||
@@ -59,18 +60,19 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit {
|
||||
|
||||
constructor(protected menuService: MenuService,
|
||||
protected injector: Injector,
|
||||
protected route: ActivatedRoute,
|
||||
protected router: Router,
|
||||
private variableService: CSSVariableService,
|
||||
private authService: AuthService,
|
||||
private modalService: NgbModal
|
||||
) {
|
||||
super(menuService, injector);
|
||||
super(menuService, injector, route, router);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set and calculate all initial values of the instance variables
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
this.createMenu();
|
||||
super.ngOnInit();
|
||||
this.sidebarWidth = this.variableService.getVariable('sidebarItemsWidth');
|
||||
this.authService.isAuthenticated()
|
||||
@@ -93,7 +95,7 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit {
|
||||
/**
|
||||
* Initialize all menu sections and items for this menu
|
||||
*/
|
||||
private createMenu() {
|
||||
createMenu() {
|
||||
const menuList = [
|
||||
/* News */
|
||||
{
|
||||
|
Reference in New Issue
Block a user