2018-04-21 17:20:09 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
2018-11-26 16:44:32 +01:00
|
|
|
import {ActivatedRoute} from '@angular/router';
|
|
|
|
import {EnvProperties} from '../../utils/properties/env-properties';
|
|
|
|
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'deposit-publications-result',
|
|
|
|
template: `
|
2018-11-26 16:44:32 +01:00
|
|
|
<deposit-result [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'"
|
|
|
|
[requestFor]="'Publications'" [piwikSiteId]=piwikSiteId
|
|
|
|
[zenodoInformation]="zenodoInformation">
|
|
|
|
</deposit-result>
|
2017-12-19 13:53:46 +01:00
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class DepositPublicationsResultComponent {
|
2018-11-26 16:44:32 +01:00
|
|
|
@Input() zenodoInformation: ZenodoInformationClass;
|
|
|
|
properties:EnvProperties;
|
|
|
|
|
2018-04-21 17:20:09 +02:00
|
|
|
@Input() piwikSiteId = null;
|
2018-11-26 16:44:32 +01:00
|
|
|
|
|
|
|
constructor (private route: ActivatedRoute) {}
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
this.route.data
|
|
|
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
|
|
|
this.properties = data.envSpecific;
|
2019-02-12 12:40:06 +01:00
|
|
|
|
|
|
|
if(!this.zenodoInformation) {
|
|
|
|
this.zenodoInformation = new ZenodoInformationClass();
|
|
|
|
}
|
2018-11-26 16:44:32 +01:00
|
|
|
if(!this.zenodoInformation.url) {
|
|
|
|
this.zenodoInformation.url = this.properties.zenodo;
|
|
|
|
}
|
|
|
|
if(!this.zenodoInformation.name) {
|
|
|
|
this.zenodoInformation.name = "Zenodo";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|