Add link to relevant zenodo entity on DOI overview with root link configurable (ref #264)
This commit is contained in:
parent
0eb0707fd5
commit
b539544075
|
@ -62,6 +62,11 @@ export class ConfigurationService extends BaseComponent {
|
|||
return this._allowOrganizationCreator;
|
||||
}
|
||||
|
||||
private _doiLink: string;
|
||||
get doiLink(): string {
|
||||
return this._doiLink;
|
||||
}
|
||||
|
||||
|
||||
public loadConfiguration(): Promise<any> {
|
||||
return new Promise((r, e) => {
|
||||
|
@ -98,6 +103,7 @@ export class ConfigurationService extends BaseComponent {
|
|||
this._lockInterval = config.lockInterval;
|
||||
this._guideAssets = config.guideAssets;
|
||||
this._allowOrganizationCreator = config.allowOrganizationCreator;
|
||||
this._doiLink = config.doiLink;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<mat-card-subtitle class="col" *ngIf="!hasDoi(dmp)">
|
||||
{{ 'DMP-EDITOR.TITLE.SUBTITLE' | translate }}: {{ dmp.doi }}
|
||||
{{ 'DMP-EDITOR.TITLE.SUBTITLE' | translate }}: <a [href]="createDoiLink(dmp.doi)">{{ dmp.doi }}</a>
|
||||
</mat-card-subtitle>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -522,6 +522,12 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
this.router.navigate(['/datasets/new/' + rowId]);
|
||||
}
|
||||
|
||||
createDoiLink(doi: string): string {
|
||||
const doiarr = doi.split('.');
|
||||
const id = doiarr[doiarr.length - 1];
|
||||
return this.configurationService.doiLink + id;
|
||||
}
|
||||
|
||||
// advancedClicked() {
|
||||
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||
// maxWidth: '500px',
|
||||
|
|
|
@ -50,5 +50,6 @@
|
|||
},
|
||||
"lockInterval": 60000,
|
||||
"guideAssets": "assets/images/guide",
|
||||
"allowOrganizationCreator": true
|
||||
"allowOrganizationCreator": true,
|
||||
"doiLink": "https://sandbox.zenodo.org/record/"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue