diff --git a/fos/fos.component.html b/fos/fos.component.html index af6ee6e0..8f707fec 100644 --- a/fos/fos.component.html +++ b/fos/fos.component.html @@ -113,7 +113,7 @@
- {{subChild.id}} + {{subChild.label}}
@@ -139,7 +139,7 @@
+ class="uk-link-text" [innerHTML]="highlightKeyword(subSubItem.label)">
diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index 88306b6f..39eaa6c5 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -32,8 +32,8 @@ import {StringUtils} from "../../utils/string-utils.class";
- {{subject}} + [queryParams]="{'fos': urlEncodeAndQuote(subject.id)}"> + {{subject.label}}
@@ -47,12 +47,12 @@ import {StringUtils} from "../../utils/string-utils.class";
- {{subject}} + [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subject.id)}"> + {{subject.label}} - {{subject}} + [href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?fos='+urlEncodeAndQuote(subject.id)"> + {{subject.label}}
@@ -71,7 +71,7 @@ import {StringUtils} from "../../utils/string-utils.class"; }) export class FosComponent { - @Input() subjects: string[]; + @Input() subjects: {"id": string, "label": string}[]; @Input() viewAll: boolean = false; @Output() viewAllClicked = new EventEmitter(); @Output() suggestClicked = new EventEmitter(); diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 6c45f45e..6b1e58e3 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -312,9 +312,11 @@ export class ResultLandingService { this.resultLandingInfo.subjects = subjectResults[0]; this.resultLandingInfo.otherSubjects = subjectResults[1]; this.resultLandingInfo.classifiedSubjects = subjectResults[2]; - this.resultLandingInfo.fos = subjectResults[3]; + subjectResults[3].forEach(element => { + this.resultLandingInfo.fos.push({id: element, label: element.replace(/^\d+/, '').trim()}); + }); if (this.resultLandingInfo.fos) { - this.resultLandingInfo.fos.sort((a, b) => a.localeCompare(b)) + this.resultLandingInfo.fos.sort((a, b) => a.id.localeCompare(b.id)); } this.resultLandingInfo.sdg = subjectResults[4]; if (this.resultLandingInfo.sdg) { diff --git a/utils/entities/resultLandingInfo.ts b/utils/entities/resultLandingInfo.ts index f1454627..0ae3866f 100644 --- a/utils/entities/resultLandingInfo.ts +++ b/utils/entities/resultLandingInfo.ts @@ -84,7 +84,7 @@ export class ResultLandingInfo { subjects: string[]; otherSubjects: Map; classifiedSubjects: Map; // - fos: string[]; + fos: {"id": string, "label": string}[] = []; sdg: string[]; eoscSubjects: any[];