diff --git a/landingPages/landing-utils/relatedTo.component.ts b/landingPages/landing-utils/relatedTo.component.ts
index a1787d26..a6190dc5 100644
--- a/landingPages/landing-utils/relatedTo.component.ts
+++ b/landingPages/landing-utils/relatedTo.component.ts
@@ -1,4 +1,4 @@
-import {Component, Input} from '@angular/core';
+import {Component, Input, OnInit} from '@angular/core';
import {Subscriber} from 'rxjs';
import {properties} from 'src/environments/environment';
@@ -11,36 +11,114 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
@Component({
selector: 'relatedTo',
template: `
-
Communities
-
-
- {{item['labelContext']}}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2" class="uk-margin-large-top uk-margin-large-right">
+
+
+
+
+ Visit Connect gateways:
+
+
+
+
+
+
+
+
+
+
+
+ Communities
+
+
{{item['labelContext']}}
-
- {{item['labelCategory']}}
- : {{item['labelConcept']}}
-
-
-
-
+
+
+
+ {{item['labelCategory']}}
+ : {{item['labelConcept']}}
+
+
+
+
+
`
})
-export class RelatedToComponent {
- @Input() contexts: { "idContext": string, "labelContext": string, "labelCategory": string, "labelConcept": string, "link": string }[];
-
+export class RelatedToComponent implements OnInit {
+ @Input() contexts: { "idContext": string, "labelContext": string, "labelCategory": string, "labelConcept": string, "link": string, "logo": string }[];
+ @Input() connectLinksView: boolean = false;
+
public threshold: number = 5;
public showNum: number = 5;
+ public gateways = [];
private subscriptions = [];
constructor(private communityService: CommunityService,
@@ -48,7 +126,7 @@ export class RelatedToComponent {
}
ngOnInit() {
- if(properties.environment === "development") {
+ if(this.connectLinksView && properties.environment === "development") {
this.contexts.forEach( context => {
if(context.idContext) {
this.subscriptions.push(
@@ -65,6 +143,16 @@ export class RelatedToComponent {
url = 'https://' + context.idContext + '.openaire.eu';
}
context.link = url;
+ // grabbing the logoUrl for the gateway links
+ if(community.logoUrl) {
+ context.logo = community.logoUrl;
+ }
+ for(let gateway of this.gateways) {
+ if(gateway.link == context.link) {
+ return; // skips so that we don't get duplicate gateways
+ }
+ }
+ this.gateways.push(context);
}
})
);
diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html
index 8d0e76b9..e1ec2cd9 100644
--- a/landingPages/result/resultLanding.component.html
+++ b/landingPages/result/resultLanding.component.html
@@ -59,6 +59,10 @@
{{resultLandingInfo.countries.join(", ")}}
+
+ 0">
+
+
diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts
index 262546d8..7b295a5e 100644
--- a/landingPages/result/resultLanding.component.ts
+++ b/landingPages/result/resultLanding.component.ts
@@ -114,6 +114,7 @@ export class ResultLandingComponent {
public isLoggedIn: boolean = Session.isLoggedIn();
public pid: string;
@ViewChild("annotation") annotation: AnnotationComponent;
+ public contextsWithLink: any;
constructor(private _resultLandingService: ResultLandingService,
private _vocabulariesService: ISVocabulariesService,
@@ -742,4 +743,8 @@ export class ResultLandingComponent {
))
}
}
+
+ public enrichContexts(contextsWithLink: any) {
+ this.contextsWithLink = contextsWithLink;
+ }
}