diff --git a/src/app/app.component.html b/src/app/app.component.html
index 5035e75..9971650 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -5,10 +5,9 @@
+ [userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user" [offCanvasFlip]="true">
-
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 1bcccee..e91838e 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -27,7 +27,7 @@ export class AppComponent implements OnInit {
params: BehaviorSubject
= new BehaviorSubject(null);
data: BehaviorSubject = new BehaviorSubject(null);
hasSidebar: boolean = false;
- hasHeader: boolean = false;
+ hasHeader: boolean = true;
hasAdminMenu: boolean = false;
isFrontPage: boolean = false;
sideBarItems: MenuItem[] = [];
@@ -83,6 +83,11 @@ export class AppComponent implements OnInit {
}));
this.subscriptions.push(this.layoutService.hasHeader.subscribe(hasHeader => {
this.hasHeader = hasHeader;
+ if(!this.hasHeader) {
+ document.documentElement.style.setProperty('--header-height', '0');
+ } else {
+ document.documentElement.style.setProperty('--header-height', '65px');
+ }
this.cdr.detectChanges();
}));
this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
@@ -113,14 +118,14 @@ export class AppComponent implements OnInit {
}
}));
} else {
- this.buildMenu();
this.loading = false;
}
} else {
- this.communityService.setCommunity(null);
- this.layoutService.setOpen(!(this.innerWidth && this.innerWidth < 1219));
- this.community = null;
- this.buildMenu();
+ if(this.community) {
+ this.communityService.setCommunity(null);
+ this.community = null;
+ this.buildMenu();
+ }
this.loading = false;
}
}
@@ -212,12 +217,12 @@ export class AppComponent implements OnInit {
badge: false,
stickyAnimation: false
};
- this.sideBarItems.push(new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info"));
- this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/users"));
- this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/admin-tools"));
- this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}));
+ this.sideBarItems.push(new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info"));
+ this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, {name: 'group'}, null, null, "/" + this.community.communityId + "/users"));
+ this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/" + this.community.communityId + "/admin-tools"));
+ this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}, {name: 'brush'}));
if (this.community.type === 'ri') {
- this.sideBarItems.push(new MenuItem("mining", "Mining", "", "/" + this.community.communityId + "/mining/manage-profiles", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/mining"));
+ this.sideBarItems.push(new MenuItem("mining", "Mining", "", "/" + this.community.communityId + "/mining/manage-profiles", false, [], [], {}, {name: 'architecture'}, null, null, "/" + this.community.communityId + "/mining"));
}
this.specialSideBarMenuItem = new MenuItem("back", "Manage communities", "", "/", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
@@ -283,7 +288,9 @@ export class AppComponent implements OnInit {
badge: false,
stickyAnimation: false
};
- this.sideBarItems.push(new MenuItem("communities", "Manage Communities", "", "/", false, [], [], {}, {name: 'settings'}));
+ if(this.isCurator()) {
+ this.sideBarItems.push(new MenuItem("communities", "Manage Communities", "", "/", false, [], [], {}, {name: 'settings'}));
+ }
if (Session.isPortalAdministrator(this.user)) {
this.sideBarItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, '/admin-tools'));
this.sideBarItems.push(new MenuItem("connect", "Connect Options", "", "/connect/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/connect/admin-tools'));
@@ -291,6 +298,7 @@ export class AppComponent implements OnInit {
}
this.specialSideBarMenuItem = null;
}
+ this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0;
}
private isCurator() {
diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts
index 213ee2a..b65ae0f 100644
--- a/src/app/app.routing.ts
+++ b/src/app/app.routing.ts
@@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
-import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
+import {RouterModule, Routes} from '@angular/router';
import {IsCommunity} from './openaireLibrary/connect/communityGuard/isCommunity.guard';
import {ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
import {AdminErrorPageComponent} from './pages/error/errorPage.component';
@@ -60,10 +60,7 @@ const routes: Routes = [
];
@NgModule({
- imports: [RouterModule.forRoot(routes, {
- preloadingStrategy: PreloadAllModules,
- onSameUrlNavigation: "reload"
- })],
+ imports: [RouterModule.forRoot(routes)],
exports: [ RouterModule ]
})
export class AppRoutingModule {}
diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary
index 936c870..a738d3b 160000
--- a/src/app/openaireLibrary
+++ b/src/app/openaireLibrary
@@ -1 +1 @@
-Subproject commit 936c870abcb48b632f3a1433130e8701c813fa65
+Subproject commit a738d3bb49d1af38f7eaf3ce34d519c76f075e4a
diff --git a/src/app/pages/affiliations/affiliations.component.html b/src/app/pages/affiliations/affiliations.component.html
index 54b4486..224a528 100644
--- a/src/app/pages/affiliations/affiliations.component.html
+++ b/src/app/pages/affiliations/affiliations.component.html
@@ -35,47 +35,47 @@
1?'s':'')">
-
-
-
-
-
-
-
-
-
{{affiliation.name}}
-
-
-
-