diff --git a/deposit/datasets/depositBySubjectResult.component.ts b/deposit/datasets/depositBySubjectResult.component.ts index e0702c5f..422e2cac 100644 --- a/deposit/datasets/depositBySubjectResult.component.ts +++ b/deposit/datasets/depositBySubjectResult.component.ts @@ -39,32 +39,14 @@ export class DepositBySubjectResultComponent { constructor (private route: ActivatedRoute) {} - constructor (private _router: Router, - private route: ActivatedRoute, - private _searchDataprovidersService: SearchDataprovidersService, - private _meta: Meta, - private _title: Title, - private _piwikService:PiwikService, - private seoService: SEOService) { - - this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService); - - this.status = this.errorCodes.LOADING; - - var description = "Openaire, repositories, open access, content provider, compatibility, organization, deposit "+ this.requestFor; - var title = "Deposit "+this.requestFor; - - this.updateTitle(title); - this.updateDescription(description); - this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url, false); - - } - 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; } diff --git a/deposit/datasets/depositDatasets.component.ts b/deposit/datasets/depositDatasets.component.ts index 7fe21798..b5e34ee3 100644 --- a/deposit/datasets/depositDatasets.component.ts +++ b/deposit/datasets/depositDatasets.component.ts @@ -33,6 +33,10 @@ export class DepositDatasetsComponent { 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; } diff --git a/deposit/datasets/depositDatasetsResult.component.ts b/deposit/datasets/depositDatasetsResult.component.ts index a6f7f03a..84826d8d 100644 --- a/deposit/datasets/depositDatasetsResult.component.ts +++ b/deposit/datasets/depositDatasetsResult.component.ts @@ -25,6 +25,10 @@ export class DepositDatasetsResultComponent { 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; } diff --git a/deposit/deposit.component.ts b/deposit/deposit.component.ts index 25999438..e71e239f 100644 --- a/deposit/deposit.component.ts +++ b/deposit/deposit.component.ts @@ -51,7 +51,6 @@ export class DepositComponent { var title = "Deposit "+this.requestFor; var description = "Openaire, repositories, open access, content provider, compatibility, organization, deposit "+ this.requestFor; - this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url, false); this.updateTitle(title); this.updateDescription(description); } @@ -59,14 +58,17 @@ export class DepositComponent { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; + this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url, false); + this.updateUrl(data.envSpecific.baseLink+this._router.url); + this.url = data.envSpecific.baseLink+this._router.url; + this.openAccess = this.properties.openAccess; this.openAccessRepo = this.properties.openAccessRepo; this.fp7Guidlines = this.properties.fp7Guidlines this.h2020Guidlines = this.properties.h2020Guidlines this.ercGuidlines = this.properties.ercGuidlines this.helpdesk = this.properties.helpdesk; - this.updateUrl(data.envSpecific.baseLink+this._router.url); - this.url = data.envSpecific.baseLink+this._router.url; + if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ this.piwiksub = this._piwikService.trackView(this.properties, "Deposit "+this.requestFor, this.piwikSiteId).subscribe(); } diff --git a/deposit/publications/depositPublications.component.ts b/deposit/publications/depositPublications.component.ts index 06a2086e..f536cc96 100644 --- a/deposit/publications/depositPublications.component.ts +++ b/deposit/publications/depositPublications.component.ts @@ -36,6 +36,10 @@ export class DepositPublicationsComponent { .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; this.mapUrl = this.properties.statisticsFrameAPIURL+"markers-test.html"; + + if(!this.zenodoInformation) { + this.zenodoInformation = new ZenodoInformationClass(); + } if(!this.zenodoInformation.url) { this.zenodoInformation.url = this.properties.zenodo; } diff --git a/deposit/publications/depositPublicationsResult.component.ts b/deposit/publications/depositPublicationsResult.component.ts index 1aa1c71f..60434974 100644 --- a/deposit/publications/depositPublicationsResult.component.ts +++ b/deposit/publications/depositPublicationsResult.component.ts @@ -25,6 +25,10 @@ export class DepositPublicationsResultComponent { 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; }