37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import {Component, Input} from '@angular/core';
|
|
import {ActivatedRoute} from '@angular/router';
|
|
import {EnvProperties} from '../../utils/properties/env-properties';
|
|
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
|
|
|
|
@Component({
|
|
selector: 'deposit-publications-result',
|
|
template: `
|
|
<deposit-result [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'"
|
|
[requestFor]="'Publications'" [piwikSiteId]=piwikSiteId
|
|
[zenodoInformation]="zenodoInformation">
|
|
</deposit-result>
|
|
`
|
|
})
|
|
|
|
export class DepositPublicationsResultComponent {
|
|
@Input() zenodoInformation: ZenodoInformationClass;
|
|
properties:EnvProperties;
|
|
|
|
@Input() piwikSiteId = null;
|
|
|
|
constructor (private route: ActivatedRoute) {}
|
|
|
|
ngOnInit() {
|
|
this.route.data
|
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
|
this.properties = data.envSpecific;
|
|
if(!this.zenodoInformation.url) {
|
|
this.zenodoInformation.url = this.properties.zenodo;
|
|
}
|
|
if(!this.zenodoInformation.name) {
|
|
this.zenodoInformation.name = "Zenodo";
|
|
}
|
|
});
|
|
}
|
|
}
|