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;
|
return this._allowOrganizationCreator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _doiLink: string;
|
||||||
|
get doiLink(): string {
|
||||||
|
return this._doiLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public loadConfiguration(): Promise<any> {
|
public loadConfiguration(): Promise<any> {
|
||||||
return new Promise((r, e) => {
|
return new Promise((r, e) => {
|
||||||
|
@ -98,6 +103,7 @@ export class ConfigurationService extends BaseComponent {
|
||||||
this._lockInterval = config.lockInterval;
|
this._lockInterval = config.lockInterval;
|
||||||
this._guideAssets = config.guideAssets;
|
this._guideAssets = config.guideAssets;
|
||||||
this._allowOrganizationCreator = config.allowOrganizationCreator;
|
this._allowOrganizationCreator = config.allowOrganizationCreator;
|
||||||
|
this._doiLink = config.doiLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<mat-card-subtitle class="col" *ngIf="!hasDoi(dmp)">
|
<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>
|
</mat-card-subtitle>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -522,6 +522,12 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
this.router.navigate(['/datasets/new/' + rowId]);
|
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() {
|
// advancedClicked() {
|
||||||
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
// maxWidth: '500px',
|
// maxWidth: '500px',
|
||||||
|
|
|
@ -50,5 +50,6 @@
|
||||||
},
|
},
|
||||||
"lockInterval": 60000,
|
"lockInterval": 60000,
|
||||||
"guideAssets": "assets/images/guide",
|
"guideAssets": "assets/images/guide",
|
||||||
"allowOrganizationCreator": true
|
"allowOrganizationCreator": true,
|
||||||
|
"doiLink": "https://sandbox.zenodo.org/record/"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue