1
|
import {Component, Input} from '@angular/core';
|
2
|
import {ActivatedRoute} from '@angular/router';
|
3
|
import {EnvProperties} from '../../utils/properties/env-properties';
|
4
|
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
|
5
|
|
6
|
@Component({
|
7
|
selector: 'deposit-datasets-result',
|
8
|
template: `
|
9
|
<deposit-result [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'"
|
10
|
[requestFor]="'Research Data'" [piwikSiteId]=piwikSiteId
|
11
|
[zenodoInformation]="zenodoInformation">
|
12
|
</deposit-result>
|
13
|
`
|
14
|
})
|
15
|
|
16
|
export class DepositDatasetsResultComponent {
|
17
|
@Input() zenodoInformation: ZenodoInformationClass;
|
18
|
properties:EnvProperties;
|
19
|
|
20
|
@Input() piwikSiteId = null;
|
21
|
|
22
|
constructor (private route: ActivatedRoute) {}
|
23
|
|
24
|
ngOnInit() {
|
25
|
this.route.data
|
26
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
27
|
this.properties = data.envSpecific;
|
28
|
if(!this.zenodoInformation.url) {
|
29
|
this.zenodoInformation.url = this.properties.zenodo;
|
30
|
}
|
31
|
if(!this.zenodoInformation.name) {
|
32
|
this.zenodoInformation.name = "Zenodo";
|
33
|
}
|
34
|
});
|
35
|
}
|
36
|
}
|