From 901855daa9cddefad13a94acc9edb09f2500dc96 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 24 Jul 2023 16:25:20 +0300 Subject: [PATCH] [Library | develop]: In search bars, set in placeholder the portal name according to the configuration name. 1. home.component & navigationBar.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName. 2. searchAll.component.ts: Set default value of "formPlaceholderText" to "Search". 3. advancedSearchForm.component.html: Set placeholder of input (when there is also the ) to [placeholder]="formPlaceholderText". --- searchPages/find/searchAll.component.ts | 2 +- searchPages/searchUtils/advancedSearchForm.component.html | 2 +- sharedComponents/navigationBar.component.html | 4 ++-- sharedComponents/navigationBar.component.ts | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index 2f594923..99900b63 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -89,7 +89,7 @@ export class SearchAllComponent { @Input() name; @Input() customFilter: SearchCustomFilter = null; - @Input() formPlaceholderText = "Search in Explore" + @Input() formPlaceholderText = "Search" // @Input() formPlaceholderText = "Search for "+OpenaireEntities.RESULTS+", "+OpenaireEntities.PROJECTS+", "+OpenaireEntities.DATASOURCES+" & "+OpenaireEntities.ORGANIZATIONS+" in OpenAIRE"; @Input() searchForm: SearchForm = {class: 'search-form', dark: true} @Input() breadcrumbs: Breadcrumb[] = []; diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 017065de..f0d88901 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -169,7 +169,7 @@ -
diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index 37005d83..3ebaf5d2 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -144,7 +144,7 @@ -
@@ -173,7 +173,7 @@ -
diff --git a/sharedComponents/navigationBar.component.ts b/sharedComponents/navigationBar.component.ts index 38cd9fc7..facfdba2 100644 --- a/sharedComponents/navigationBar.component.ts +++ b/sharedComponents/navigationBar.component.ts @@ -70,6 +70,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges { showEntity = {}; showPage = {}; public searchMode: boolean = false; + public portalName: string = ""; public additionalMenuItems: MenuItem[] = []; public featuredMenuItems: MenuItem[] = []; @@ -136,6 +137,9 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges { //this.config.getCommunityInformation(this.properties, this.communityId).subscribe(data => { this.subs.push(this.config.portalAsObservable.subscribe(data => { if (data) { + if(data.name) { + this.portalName = data.name; + } this.showEntity = {}; this.showPage = {}; if (data['entities']) {