import {Component, Input} from '@angular/core'; import {Router} from '@angular/router'; import {ActivatedRoute} from '@angular/router'; import {Title, Meta} from '@angular/platform-browser'; import {Observable} from 'rxjs/Observable'; import {EnvProperties} from '../../utils/properties/env-properties'; import {ErrorCodes} from '../../utils/properties/errorCodes'; import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataproviders.class'; import {RouterHelper} from '../../utils/routerHelper.class'; import {SearchDataprovidersService} from '../../services/searchDataproviders.service'; import {OrganizationService} from '../../services/organization.service'; import {PiwikService} from '../../utils/piwik/piwik.service'; import { SEOService } from '../../sharedComponents/SEO/SEO.service'; import {ZenodoInformationClass} from '../utils/zenodoInformation.class'; @Component({ selector: 'deposit-by-subject-result', template: ` ` //templateUrl: 'depositBySubjectResult.component.html' }) export class DepositBySubjectResultComponent { @Input() piwikSiteId = null; @Input() zenodoInformation: ZenodoInformationClass; public subject: string = ""; properties:EnvProperties; constructor (private route: ActivatedRoute) {} ngOnInit() { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; if(!this.zenodoInformation) { this.zenodoInformation = new ZenodoInformationClass(); } if(!this.zenodoInformation.url) { this.zenodoInformation.url = this.properties.zenodo; } if(!this.zenodoInformation.name) { this.zenodoInformation.name = "Zenodo"; } }); } }