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:
parent
bf71259eff
commit
96b77e8205
|
@ -72,7 +72,7 @@ export class AppComponent {
|
||||||
this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe (
|
this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe (
|
||||||
communities => {
|
communities => {
|
||||||
this.userMenuItems =[ new MenuItem("","My profile","","",false,[],[],{}),
|
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){
|
for(var com of communities){
|
||||||
if((data['communityId'] && data['communityId']!="" && com.communityId == data['communityId'])
|
if((data['communityId'] && data['communityId']!="" && com.communityId == data['communityId'])
|
||||||
|
|
|
@ -1,8 +1,27 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openaire-directLinking',
|
selector: 'openaire-directLinking',
|
||||||
template: `<directLinking></directLinking>`
|
template: `<directLinking [communityId]=communityId></directLinking>`
|
||||||
})
|
})
|
||||||
export class OpenaireDirectLinkingComponent {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="showAll">
|
<span *ngIf="showAll">
|
||||||
<span *ngFor="let subject of community.subjects.slice(10) let i=index">
|
<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)"> </span> -->
|
<!-- <span *ngIf="i<(community.subjects.length-1)"> </span> -->
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class="uk-margin-left"></subscribe>
|
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class="uk-margin-left"></subscribe>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</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="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 *ngIf="publicationTotal != null && IsEntityEnabled('publication')" class="uk-first-column">
|
||||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||||
|
|
Loading…
Reference in New Issue