|
|
|
@ -12,6 +12,7 @@ import {Session, User} from './openaireLibrary/login/utils/helper.class';
|
|
|
|
|
import {HelperFunctions} from './openaireLibrary/utils/HelperFunctions.class';
|
|
|
|
|
import {UserManagementService} from './openaireLibrary/services/user-management.service';
|
|
|
|
|
import {ConnectHelper} from "./openaireLibrary/connect/connectHelper";
|
|
|
|
|
import {Header} from './openaireLibrary/sharedComponents/navigationBar.component';
|
|
|
|
|
|
|
|
|
|
declare var UIkit: any;
|
|
|
|
|
|
|
|
|
@ -37,6 +38,8 @@ export class AppComponent implements OnInit {
|
|
|
|
|
wellcome = false;
|
|
|
|
|
showMenu: boolean = false;
|
|
|
|
|
user: User;
|
|
|
|
|
logoPath: string = 'assets/common-assets/';
|
|
|
|
|
header: Header;
|
|
|
|
|
|
|
|
|
|
constructor(private route: ActivatedRoute,
|
|
|
|
|
private propertiesService: EnvironmentSpecificService,
|
|
|
|
@ -46,11 +49,7 @@ export class AppComponent implements OnInit {
|
|
|
|
|
this.router.events.forEach((event) => {
|
|
|
|
|
if (event instanceof NavigationStart) {
|
|
|
|
|
HelperFunctions.scroll();
|
|
|
|
|
if (event.url === '/') {
|
|
|
|
|
this.wellcome = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.wellcome = false;
|
|
|
|
|
}
|
|
|
|
|
this.wellcome = event.url === '/';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -110,6 +109,14 @@ export class AppComponent implements OnInit {
|
|
|
|
|
name: (com.shortTitle) ? com.shortTitle : com.title,
|
|
|
|
|
logoUrl: com.logoUrl
|
|
|
|
|
};
|
|
|
|
|
this.header = {
|
|
|
|
|
url: 'https://' + (this.properties.environment == 'beta' ? 'beta.' : '') + this.community.id + '.openaire.eu',
|
|
|
|
|
title: this.community.name,
|
|
|
|
|
logoUrl: this.community.logoUrl,
|
|
|
|
|
logoSmallUrl: this.community.logoUrl,
|
|
|
|
|
position: 'left',
|
|
|
|
|
badge: true
|
|
|
|
|
};
|
|
|
|
|
this.communityType = com.type;
|
|
|
|
|
this.menuItems = [
|
|
|
|
|
{
|
|
|
|
@ -123,6 +130,14 @@ export class AppComponent implements OnInit {
|
|
|
|
|
name: (communities[index_managerOfCommunity].shortTitle) ? communities[index_managerOfCommunity].shortTitle : com.title,
|
|
|
|
|
logoUrl: communities[index_managerOfCommunity].logoUrl
|
|
|
|
|
};
|
|
|
|
|
this.header = {
|
|
|
|
|
url: 'https://' + (this.properties.environment == 'beta' ? 'beta.' : '') + this.community.id + '.openaire.eu',
|
|
|
|
|
title: this.community.name,
|
|
|
|
|
logoUrl: this.community.logoUrl,
|
|
|
|
|
logoSmallUrl: this.community.logoUrl,
|
|
|
|
|
position: 'left',
|
|
|
|
|
badge: true
|
|
|
|
|
};
|
|
|
|
|
this.menuItems = [
|
|
|
|
|
{
|
|
|
|
|
rootItem: new MenuItem('dashboard', 'Overview', '/dashboard', '/dashboard', false, [], null, {communityId: communities[index_managerOfCommunity].communityId}),
|
|
|
|
@ -132,6 +147,15 @@ export class AppComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!this.communityId || this.communityId === '') {
|
|
|
|
|
this.header = {
|
|
|
|
|
route: "/",
|
|
|
|
|
url: null,
|
|
|
|
|
title: 'connect-admin',
|
|
|
|
|
logoUrl: this.logoPath + 'logo-large-connect.png',
|
|
|
|
|
logoSmallUrl:this.logoPath + 'logo-small-connect.png',
|
|
|
|
|
position:'left',
|
|
|
|
|
badge:true
|
|
|
|
|
};
|
|
|
|
|
this.community = null;
|
|
|
|
|
}
|
|
|
|
|
if (this.communityId) {
|
|
|
|
|