add homeurl boolean 
	if homeurl is true link to logo takes you to home page "/"
	for communities if no homeurl takes you to beta._id_.openaire.eu


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54207 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-12-07 12:36:19 +00:00
parent ba1868051c
commit be9da138d5
2 changed files with 36 additions and 13 deletions

View File

@ -7,11 +7,18 @@
</a>
</div>
<div class="uk-navbar-center">
<a class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" >
<img *ngIf="!community" src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
<img *ngIf="community && community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div *ngIf="community" class="uk-margin-left uk-text-large"> {{community.name}} </div>
<a *ngIf="!community" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" >
<img src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
</a>
<a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo" [href]="'https://beta.'+community.id+'.openaire.eu'" target="_blank">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
<a *ngIf="community && homeurl" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" >
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
</div>
<!--div class="uk-navbar-right uk-margin-xlarge-top">
<user-mini></user-mini>
@ -99,19 +106,34 @@
<div class="uk-container uk-container-expand">
<nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
<div class="uk-navbar-left uk-visible@l uk-width-1-3">
<a routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
<a *ngIf="!community" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
<img src="{{logoPath}}logo-large-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
</a>
<img *ngIf="!community" src="{{logoPath}}logo-large-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
<img *ngIf="community && community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div *ngIf="community" class="uk-margin-left uk-text-large"> {{community.name}} </div>
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
<a *ngIf="community && !homeurl" [href]="'https://beta.'+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
</div>
<div class="uk-navbar-left uk-visible@m uk-hidden@l uk-width-1-3">
<a routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
<img *ngIf="!community" src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
<img *ngIf="community && community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div *ngIf="community" class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
<a *ngIf="!community" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
<img src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
</a>
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
<a *ngIf="community && !homeurl" [href]="'https://beta.'+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
</div>
<!-- <div *ngIf="!onlyTop" class="uk-navbar-center"> -->
<div *ngIf="!onlyTop" class="uk-navbar-right">

View File

@ -24,6 +24,7 @@ export class NavigationBarComponent {
@Input() menuItems:RootMenuItem [] ;
@Input() community: {id:string, name:string, logoUrl:string};
@Input() showMenu:boolean = true;
@Input() homeurl:boolean = true;
public isAuthorized: boolean = false;
sub:any;