From b61f42c532184f555bea6c9a370ee5c72c11caed Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 11 Jul 2023 15:11:37 +0300 Subject: [PATCH] [Aggregator | develop]: search.component.ts: Added in input [openAccess]="false" | searchAll.component.ts: Added @Input() openAccess: boolean = true; and add "resultbestaccessright" parameter in queries if this is true | home.module.ts: Imported SearchInputModule | home.component: In search bar, remove 2 steps, go to search all page and add advanced search link. --- src/app/home/home.component.html | 31 ++++++++----- src/app/home/home.component.ts | 48 ++++++++++---------- src/app/home/home.module.ts | 3 +- src/app/openaireLibrary | 2 +- src/app/searchPages/find/search.component.ts | 2 +- 5 files changed, 47 insertions(+), 39 deletions(-) diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index f4b8e51..1101bee 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -7,18 +7,25 @@ Discover open linked research. -
- - -
-
-
-
- -
-
+
+ +
+ + + + + + + + + + +
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 258869f..66b3b9c 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -189,32 +189,32 @@ export class HomeComponent { } goTo(simple: boolean) { - let url = (simple) ? this.selectedEntitySimpleUrl : this.selectedEntityAdvancedUrl; + let url = this.properties.searchLinkToAll; let parameterNames = []; let parameterValues = []; - if (this.selectedEntity == "result") { - if (this.resultTypes) { - let values = []; - for (let value of this.resultTypes.values) { - if (value.selected) { - values.push(value.id); - } - } - if (values.length > 0 && values.length != 4) { - parameterNames.push("type"); - parameterValues.push(values.join(",")); - } - if (this.resultsQuickFilter) { - parameterNames.push("qf"); - parameterValues.push("" + this.resultsQuickFilter.selected); - } - } - } else if (this.selectedEntity == "all") { - if (this.resultsQuickFilter) { - parameterNames.push("qf"); - parameterValues.push("true"); - } - } + // if (this.selectedEntity == "result") { + // if (this.resultTypes) { + // let values = []; + // for (let value of this.resultTypes.values) { + // if (value.selected) { + // values.push(value.id); + // } + // } + // if (values.length > 0 && values.length != 4) { + // parameterNames.push("type"); + // parameterValues.push(values.join(",")); + // } + // if (this.resultsQuickFilter) { + // parameterNames.push("qf"); + // parameterValues.push("" + this.resultsQuickFilter.selected); + // } + // } + // } else if (this.selectedEntity == "all") { + // if (this.resultsQuickFilter) { + // parameterNames.push("qf"); + // parameterValues.push("true"); + // } + // } if (this.keyword.length > 0) { parameterNames.push("fv0"); parameterValues.push(this.keyword); diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index f5e41b9..270be08 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -28,6 +28,7 @@ import {book, cog, database, earth} from "../openaireLibrary/utils/icons/icons"; import {NumbersModule} from "../openaireLibrary/sharedComponents/numbers/numbers.module"; import {AdvancedSearchInputModule} from "../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module"; import {InputModule} from "../openaireLibrary/sharedComponents/input/input.module"; +import {SearchInputModule} from "../openaireLibrary/sharedComponents/search-input/search-input.module"; @NgModule({ imports: [ @@ -40,7 +41,7 @@ import {InputModule} from "../openaireLibrary/sharedComponents/input/input.modul HomeRoutingModule, HelperModule, ErrorMessagesModule, - SEOServiceModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule + SEOServiceModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule, SearchInputModule ], declarations: [ HomeComponent diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 110c854..5f980c0 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 110c854523199f24143bb7d0e56e8815c6808319 +Subproject commit 5f980c01bb4263b6d02d2f8c0c753395f54fe4a1 diff --git a/src/app/searchPages/find/search.component.ts b/src/app/searchPages/find/search.component.ts index 7193296..a2b96c1 100644 --- a/src/app/searchPages/find/search.component.ts +++ b/src/app/searchPages/find/search.component.ts @@ -9,7 +9,7 @@ import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearc selector: 'openaire-search-find', template: ` + [searchForm]="searchForm" [openAccess]="false"> `, }) export class OpenaireSearchComponent{