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-datasets',
|
|
|
|
template: `
|
2019-07-23 10:05:04 +02:00
|
|
|
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle" >
|
2017-12-19 13:53:46 +01:00
|
|
|
<div uk-grid uk-grid>
|
|
|
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
|
|
|
|
|
|
|
<div class="uk-container">
|
2018-11-26 16:44:32 +01:00
|
|
|
<deposit [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'"
|
|
|
|
[requestFor]="'Research Data'" [searchBySubjects]=true [piwikSiteId]=piwikSiteId
|
|
|
|
[zenodoInformation]="zenodoInformation">
|
|
|
|
</deposit>
|
2017-12-19 13:53:46 +01:00
|
|
|
<div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class DepositDatasetsComponent {
|
2018-11-26 16:44:32 +01:00
|
|
|
@Input() piwikSiteId = null;
|
|
|
|
properties:EnvProperties;
|
|
|
|
@Input() zenodoInformation: ZenodoInformationClass;
|
|
|
|
|
|
|
|
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
|
|
|
}
|