-
{{result.name}}
@@ -73,6 +73,7 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
})
export class RelatedDatasourcesTabComponent {
+ @Input() prevPath: string = "";
@Input() dataproviderId: string;
// @Input() fetchPublications : FetchResearchResults;
// @Input() fetchDatasets : FetchResearchResults;
@@ -137,4 +138,11 @@ export class RelatedDatasourcesTabComponent {
this.modal.cancel();
}
}
+
+ public addEoscPrevInParams(obj) {
+ if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
+ return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
+ }
+ return obj;
+ }
}
diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts
index 48536226..dc7f0052 100644
--- a/landingPages/landing-utils/availableOn.component.ts
+++ b/landingPages/landing-utils/availableOn.component.ts
@@ -1,6 +1,7 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview";
import {properties} from "../../../../environments/environment";
+import {RouterHelper} from "../../utils/routerHelper.class";
@Component({
selector: 'availableOn',
@@ -47,9 +48,9 @@ import {properties} from "../../../../environments/environment";
{{instance.license}}
@@ -80,6 +81,7 @@ import {properties} from "../../../../environments/environment";
})
export class AvailableOnComponent {
+ @Input() prevPath: string = "";
@Input() availableOn: HostedByCollectedFrom[];
@Input() viewAll: boolean = false;
@Output() viewAllClicked = new EventEmitter();
@@ -87,7 +89,8 @@ export class AvailableOnComponent {
public threshold: number = 1;
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
public title: string = "Download from";
-
+ public routerHelper:RouterHelper = new RouterHelper();
+
constructor() {
}
@@ -122,4 +125,11 @@ export class AvailableOnComponent {
public isUrl(str: string): boolean {
return str.startsWith('http://') || str.startsWith('https://') || str.startsWith('//') || str.startsWith('www.');
}
+
+ public addEoscPrevInParams(obj) {
+ if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
+ return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
+ }
+ return obj;
+ }
}
diff --git a/landingPages/landing-utils/fundedBy.component.ts b/landingPages/landing-utils/fundedBy.component.ts
index 634998e1..5f0e3cea 100644
--- a/landingPages/landing-utils/fundedBy.component.ts
+++ b/landingPages/landing-utils/fundedBy.component.ts
@@ -2,6 +2,7 @@ import {Component, EventEmitter, Input, Output} from '@angular/core';
import {Project} from "../../utils/result-preview/result-preview";
import {properties} from "../../../../environments/environment";
import {HelperFunctions} from '../../utils/HelperFunctions.class';
+import {RouterHelper} from "../../utils/routerHelper.class";
@Component({
selector: 'fundedBy',
@@ -33,7 +34,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class';
Project
+ [queryParams]="addEoscPrevInParams({projectId: item.id})" [routerLink]="url">
{{item['acronym'] ? item['acronym'] : item['title']}}
@@ -72,6 +73,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class';
})
export class FundedByComponent {
+ @Input() prevPath: string = "";
@Input() fundedByProjects: Project[];
@Input() viewAll: boolean = false;
@Output() viewAllClicked = new EventEmitter();
@@ -81,6 +83,7 @@ export class FundedByComponent {
public title: string = "Funded by";
@Input() provenanceActionVocabulary = null;
public provenancesCalculated: boolean[] = [];
+ public routerHelper:RouterHelper = new RouterHelper();
public viewAllClick() {
if(this.fundedByProjects.length <= this.threshold*2) {
@@ -104,4 +107,11 @@ export class FundedByComponent {
}
return item.provenanceAction;
}
+
+ public addEoscPrevInParams(obj) {
+ if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
+ return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
+ }
+ return obj;
+ }
}
diff --git a/landingPages/landing-utils/metrics/metrics.component.ts b/landingPages/landing-utils/metrics/metrics.component.ts
index be072205..61b0dfdf 100644
--- a/landingPages/landing-utils/metrics/metrics.component.ts
+++ b/landingPages/landing-utils/metrics/metrics.component.ts
@@ -77,7 +77,7 @@ import {OpenaireEntities} from "../../../utils/properties/searchFields";
-
+
{{metrics.infos.get(key).name}}
|
@@ -128,6 +128,7 @@ import {OpenaireEntities} from "../../../utils/properties/searchFields";
})
export class MetricsComponent {
+ @Input() prevPath: string = "";
@Output() metricsResults = new EventEmitter();
@Input() id: string;
@Input() entityType: string;
diff --git a/landingPages/landing-utils/projects-in-modal.component.ts b/landingPages/landing-utils/projects-in-modal.component.ts
index a2b055e7..cf49af6c 100644
--- a/landingPages/landing-utils/projects-in-modal.component.ts
+++ b/landingPages/landing-utils/projects-in-modal.component.ts
@@ -39,7 +39,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
+ [showLoading]="true" [properties]="properties" [prevPath]="prevPath">
size"
(pageChange)="pageChange($event)"
@@ -52,6 +52,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
})
export class ProjectsInModalComponent {
+ @Input() prevPath: string = "";
@Input() fetchProjects: FetchProjects;
@Input() organizationId: string = "";
@Input() properties: EnvProperties;
diff --git a/landingPages/organization/deletedByInference/deletedByInference.component.ts b/landingPages/organization/deletedByInference/deletedByInference.component.ts
index 8bc7716b..b2b6ecc6 100644
--- a/landingPages/organization/deletedByInference/deletedByInference.component.ts
+++ b/landingPages/organization/deletedByInference/deletedByInference.component.ts
@@ -26,7 +26,8 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
pageSize" [type]="type"
@@ -38,6 +39,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
`
})
export class OrganizationsDeletedByInferenceComponent {
+ @Input() prevPath: string = "";
public results: OrganizationInfo[] = [];
@Input() id: string;
@Input() ids: string[] = [];
diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html
index 426c44d4..1c029bd1 100644
--- a/landingPages/organization/organization.component.html
+++ b/landingPages/organization/organization.component.html
@@ -4,7 +4,7 @@
|