dmp&dataset overview: orcid path for researcher fixed

This commit is contained in:
gpapavgeri 2020-07-10 18:28:10 +03:00
parent 872e80d4b7
commit 09f207eb6e
4 changed files with 17 additions and 5 deletions

View File

@ -76,7 +76,7 @@
<div class="row header">{{'DMP-OVERVIEW.RESEARCHERS' | translate}}</div>
<div class="row">
<div *ngFor="let researcher of researchers; let last = last">
<a href="{{ getOrcidPath() + researcher.id }}" target="blank" class="researcher">
<a href="{{ getOrcidPathForResearcher(researcher.reference) }}" target="blank" class="researcher">
<div class="id-btn">&nbsp;</div>
<div *ngIf="!last">{{ researcher.name }}, </div>
<div *ngIf="last">{{ researcher.name }}</div>

View File

@ -303,6 +303,12 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
return this.configurationService.orcidPath;
}
getOrcidPathForResearcher(reference: string): string {
const path = this.getOrcidPath();
const userId = reference.split(':')[1];
return path + userId;
}
downloadPDF(id: string) {
this.datasetService.downloadPDF(id)
.pipe(takeUntil(this._destroyed))

View File

@ -63,7 +63,7 @@
<div class="row header">{{'DMP-OVERVIEW.RESEARCHERS' | translate}}</div>
<div class="row">
<div *ngFor="let researcher of dmp.researchers; let last = last">
<a href="{{ getOrcidPath() + researcher.id}}" target="blank" class="researcher">
<a href="{{ getOrcidPathForResearcher(researcher.reference) }}" target="blank" class="researcher">
<div class="id-btn">&nbsp;</div>
<div *ngIf="!last">{{ researcher.name }}, </div>
<div *ngIf="last">{{ researcher.name }}</div>

View File

@ -632,6 +632,12 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
return this.configurationService.orcidPath;
}
getOrcidPathForResearcher(reference: string): string {
const path = this.getOrcidPath();
const userId = reference.split(':')[1];
return path + userId;
}
checkLockStatus(id: string) {
this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed))
.subscribe(lockStatus => this.lockStatus = lockStatus);