my claims link to my links, add community to be preselected in direct claim

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@52821 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-07-25 14:00:50 +00:00
parent bf71259eff
commit 96b77e8205
3 changed files with 24 additions and 4 deletions

View File

@ -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,[],[],{}));

View File

@ -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: `<directLinking></directLinking>`
template: `<directLinking [communityId]=communityId></directLinking>`
})
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);
}
});
}
}

View File

@ -29,7 +29,7 @@
</span>
<span *ngIf="showAll">
<span *ngFor="let subject of community.subjects.slice(10) let i=index">
<span *ngIf="subject != ''" class="uk-label">{{subject}}</span>
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">{{subject}}</span>
<!-- <span *ngIf="i<(community.subjects.length-1)">&nbsp;</span> -->
</span>
</span>
@ -53,6 +53,7 @@
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class="uk-margin-left"></subscribe>
</p>
</div>
<!--invite *ngIf="communityId != null && communityId != '' && community" [communityId]=communityId [communityName]=community.shortTitle> </invite-->
<div *ngIf="communityId != null && communityId != ''" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid" uk-grid="">
<div *ngIf="publicationTotal != null && IsEntityEnabled('publication')" class="uk-first-column">
<div class="uk-card uk-card-default uk-card-small uk-card-body">