Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
import {Router} from '@angular/router';
|
|
|
|
import {ActivatedRoute} from '@angular/router';
|
|
|
|
import {Title, Meta} from '@angular/platform-browser';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2019-06-03 15:20:36 +02:00
|
|
|
import {Observable} from 'rxjs';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
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';
|
2018-11-14 11:38:53 +01:00
|
|
|
import { SEOService } from '../../sharedComponents/SEO/SEO.service';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2018-11-26 16:44:32 +01:00
|
|
|
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
|
|
|
|
|
2017-12-19 13:53:46 +01:00
|
|
|
@Component({
|
|
|
|
selector: 'deposit-by-subject-result',
|
2019-02-12 12:15:21 +01:00
|
|
|
template: `
|
|
|
|
<deposit-result [requestFor]="'Research Data'" [piwikSiteId]=piwikSiteId
|
|
|
|
[zenodoInformation]="zenodoInformation"
|
|
|
|
[subjectResults]="true" [subject]="subject">
|
|
|
|
</deposit-result>
|
|
|
|
`
|
|
|
|
//templateUrl: 'depositBySubjectResult.component.html'
|
2017-12-19 13:53:46 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
export class DepositBySubjectResultComponent {
|
2018-04-11 10:59:01 +02:00
|
|
|
@Input() piwikSiteId = null;
|
2019-02-12 12:15:21 +01:00
|
|
|
@Input() zenodoInformation: ZenodoInformationClass;
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2019-02-12 12:15:21 +01:00
|
|
|
public subject: string = "";
|
2018-02-05 14:14:59 +01:00
|
|
|
properties:EnvProperties;
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2019-02-12 12:15:21 +01:00
|
|
|
constructor (private route: ActivatedRoute) {}
|
2018-11-26 16:44:32 +01:00
|
|
|
|
2017-12-19 13:53:46 +01:00
|
|
|
ngOnInit() {
|
2018-02-05 14:14:59 +01:00
|
|
|
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";
|
|
|
|
}
|
2018-02-05 14:14:59 +01:00
|
|
|
});
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|
|
|
|
}
|