diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 14d23f6..c5dda0c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -72,7 +72,7 @@ export class AppComponent { this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe ( communities => { this.userMenuItems =[ new MenuItem("","My profile","","",false,[],[],{}), - new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}), + new MenuItem("","My links","","/myclaims",false,[],["/myclaims"],(data['communityId'] && typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:data['communityId']}), ]; for(var com of communities){ if((data['communityId'] && data['communityId']!="" && com.communityId == data['communityId']) @@ -123,7 +123,7 @@ export class AppComponent { }else{ this.bottomMenuItems = [ new MenuItem("","About","","/about",false,[],["/about"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}), - new MenuItem("","Organizations","","/organizations",false,[],["/organizations"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}) + new MenuItem("","Organizations","","/organizations",false,[],["/organizations"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}) ]; if(this.properties.showContent){ this.bottomMenuItems.push(new MenuItem("","Content Policy","","/content",false,[],[],{})); diff --git a/src/app/claims/directLinking/directLinking.component.ts b/src/app/claims/directLinking/directLinking.component.ts index afabe0a..bfb93e7 100644 --- a/src/app/claims/directLinking/directLinking.component.ts +++ b/src/app/claims/directLinking/directLinking.component.ts @@ -1,8 +1,27 @@ import {Component, Input} from '@angular/core'; +import {Observable} from 'rxjs/Observable'; +import {ActivatedRoute, Router} from '@angular/router'; +import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; @Component({ selector: 'openaire-directLinking', - template: `` + template: `` }) export class OpenaireDirectLinkingComponent { + communityId:string; + constructor ( + private route: ActivatedRoute, + private _router: Router + + ) { + this.route.queryParams.subscribe( + communityId => { + this.communityId = communityId['communityId']; + if(!this.communityId){ + this.communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname); + } + + }); + + } } diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index 3036146..7ad0815 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -29,7 +29,7 @@ - {{subject}} + {{subject}} @@ -53,6 +53,7 @@

+