Utilize conditions regarding sidebar visibillity
This commit is contained in:
parent
586e8359a5
commit
cc2c9de1f1
|
@ -2,14 +2,14 @@
|
|||
<loading [full]="true"></loading>
|
||||
</div>
|
||||
<div *ngIf="!loading" [class.stakeholderPage]="isFrontPage">
|
||||
<div id="container" class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar"
|
||||
[class.sidebar_mini]="!open && hasSidebar && (!hasAdminMenu || hasAdminMenu && adminMenuItems?.length > 0)">
|
||||
<div id="container" class="sidebar_main_swipe" [class.sidebar_main_active]="open && (hasSidebar || hasAdminMenu)"
|
||||
[class.sidebar_mini]="!open && hasSidebar && (!hasAdminMenu || hasAdminMenu)">
|
||||
<div id="modal-container"></div>
|
||||
<navbar *ngIf="hasHeader" portal="monitor_dashboard" [header]="menuHeader"
|
||||
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user" [offCanvasFlip]="true"></navbar>
|
||||
<div>
|
||||
<dashboard-sidebar *ngIf="stakeholder && isFrontPage && hasSidebar" queryParamsHandling="merge" [items]="sideBarItems" [activeItem]="activeTopic?activeTopic.alias:null"></dashboard-sidebar>
|
||||
<dashboard-sidebar *ngIf="hasAdminMenu && adminMenuItems?.length > 0" [items]="adminMenuItems" [specialMenuItem]="specialSideBarMenuItem"></dashboard-sidebar>
|
||||
<dashboard-sidebar *ngIf="hasAdminMenu" [items]="adminMenuItems" [specialMenuItem]="specialSideBarMenuItem"></dashboard-sidebar>
|
||||
<main>
|
||||
<router-outlet></router-outlet>
|
||||
</main>
|
||||
|
|
|
@ -243,11 +243,9 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
if (items.length === 0) {
|
||||
items.push(new MenuItem('noTopics', 'No topics available yet', "", "", false, [], [], {}));
|
||||
}
|
||||
} else {
|
||||
let topicItem: MenuItem = new MenuItem("private", "Private Data", "", "", null, [], [], {});
|
||||
items.push(topicItem);
|
||||
}
|
||||
this.sideBarItems = items;
|
||||
this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0;
|
||||
}
|
||||
|
||||
buildMenu() {
|
||||
|
@ -280,21 +278,21 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
null, null, null, null),
|
||||
items: []
|
||||
});
|
||||
}
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("methodology", "Methodology",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}), items: [
|
||||
new MenuItem("methodology", "Terminology and construction",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
||||
new MenuItem("methodology", "See how it works",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}, null, "how"),
|
||||
]
|
||||
});
|
||||
if (this.stakeholder.type === "funder") {
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("develop", "Develop",
|
||||
"", "/" + this.stakeholder.alias + "/develop", false, [], null, {}), items: []
|
||||
rootItem: new MenuItem("methodology", "Methodology",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}), items: [
|
||||
new MenuItem("methodology", "Terminology and construction",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
||||
new MenuItem("methodology", "See how it works",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}, null, "how"),
|
||||
]
|
||||
});
|
||||
if (this.stakeholder.type === "funder") {
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("develop", "Develop",
|
||||
"", "/" + this.stakeholder.alias + "/develop", false, [], null, {}), items: []
|
||||
});
|
||||
}
|
||||
}
|
||||
if (this.isManager(this.stakeholder)) {
|
||||
this.menuItems.push({
|
||||
|
@ -385,6 +383,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.adminMenuItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, 'admin/admin-tools'));
|
||||
this.adminMenuItems.push(new MenuItem("stakeholders", "Monitor Options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, 'admin/monitor/admin-tools'));
|
||||
}
|
||||
this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8c3756677b172aea716453685e1cc88e3bb514be
|
||||
Subproject commit d35ae7067f39fafeb3d4298ad4d6996e456ae531
|
Loading…
Reference in New Issue