From e518c99b53e8fece696fe419857d23ed97504a5c Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 14 Oct 2020 09:54:49 +0000 Subject: [PATCH] [Admin | Trunk]: Create header for navigation bar git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@59586 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.component.html | 1 + src/app/app.component.ts | 34 +++++++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index d2688fb..ce3fa75 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,5 @@ { 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) {