From d1543953a2e1323d5a9fee6de0f17697fb3e16db Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 24 Jul 2023 19:56:51 +0300 Subject: [PATCH] [Aggregator | develop]: In search bars, set in placeholder the portal name according to the configuration name. 1. home.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName. 2. portal.ts: Added parameter "name: string" in method "getMockCommunityInfo()" and set communityInfo.name = name; 3. aggregators.ts: In method "getCommunityInfoByMenuId()", added "name" parameter in Portal.getMockCommunityInfo() | Updated titles in PortalAggregators>AggregatorInfo. --- src/app/home/home.component.html | 2 +- src/app/home/home.component.ts | 4 ++++ src/app/openaireLibrary | 2 +- src/app/utils/aggregators.ts | 10 +++++----- src/assets/openaire-theme | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 1101bee..9f51a28 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -13,7 +13,7 @@ Advanced search -
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 2993b82..7a2c3dc 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -26,6 +26,7 @@ import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/num styleUrls: ['home.component.less'] }) export class HomeComponent { + public portalName: string = ""; public keyword: string = ""; public searchFields: SearchFields = new SearchFields(); public errorCodes: ErrorCodes = new ErrorCodes(); @@ -112,6 +113,9 @@ export class HomeComponent { } this.subs.push(this.config.portalAsObservable.subscribe(data => { if (data) { + if(data.name) { + this.portalName = data.name; + } var showEntity = {}; for (var i = 0; i < data['entities'].length; i++) { showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"]; diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 2f98910..27f644a 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 2f989107123ae674aba4907b113e4498a8f87786 +Subproject commit 27f644aad1f4568a03bafbbd3d1640568a725957 diff --git a/src/app/utils/aggregators.ts b/src/app/utils/aggregators.ts index d8494db..9ab545f 100644 --- a/src/app/utils/aggregators.ts +++ b/src/app/utils/aggregators.ts @@ -36,7 +36,7 @@ export class AggregatorInfo { export class PortalAggregators { static list: AggregatorInfo[] = [ - new AggregatorInfo("canada", "Canadian Aggregator", "assets/canada-logo.png", "Country", + new AggregatorInfo("canada", "Canada Explore", "assets/canada-logo.png", "Country", "country", "CA", "Canada", "Portal to Canadian Research Outputs", ` Welcome to the Portal of Canadian Research Outputs. This has been developed as part of a collaboration between @@ -70,8 +70,8 @@ export class PortalAggregators { } `), - new AggregatorInfo("italy", "Italian Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"), - new AggregatorInfo("greece", "Greek Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece") + new AggregatorInfo("italy", "Italy Explore", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"), + new AggregatorInfo("greece", "Greece Explore", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece") ]; static disabled = { "canada": {pages: ["/search/find/services"], entities: ["service"]}, @@ -105,9 +105,9 @@ export class PortalAggregators { public static getCommunityInfoByMenuId(menuId: string): any { if(PortalAggregators.disabled[menuId]){ - return Portal.getMockCommunityInfo(menuId, PortalAggregators.disabled[menuId].entities,PortalAggregators.disabled[menuId].pages); + return Portal.getMockCommunityInfo(menuId, PortalAggregators.getFilterInfoByMenuId(menuId).title, PortalAggregators.disabled[menuId].entities,PortalAggregators.disabled[menuId].pages); } - return Portal.getMockCommunityInfo(menuId, [],[]); + return Portal.getMockCommunityInfo(menuId, PortalAggregators.getFilterInfoByMenuId(menuId).title, [],[]); } } diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index 2fffe0f..cf3dab8 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit 2fffe0fa672adcf5577461d10c30e34b00308c85 +Subproject commit cf3dab89f7356b88abfe6f125930076466e8a780