openaire-library/deposit/publications/depositPublications.compone...

48 lines
1.5 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',
template: `
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" >
<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">
<deposit [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'"
[requestFor]="'Publications'" [mapUrl]=mapUrl [piwikSiteId]=piwikSiteId
[zenodoInformation]="zenodoInformation">
</deposit>
</div>
</div>
</div>
</div>
`
})
export class DepositPublicationsComponent {
@Input() zenodoInformation: ZenodoInformationClass;
public mapUrl = null;
@Input() piwikSiteId = null;
properties:EnvProperties;
constructor (private route: ActivatedRoute) {}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.mapUrl = this.properties.statisticsFrameAPIURL+"markers-test.html";
if(!this.zenodoInformation.url) {
this.zenodoInformation.url = this.properties.zenodo;
}
if(!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
});
}
}