From 3047236d1c7e157af608dcb5e595a8b7bc10a0d5 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 11 May 2023 17:17:16 +0300 Subject: [PATCH] [Library & openaire-theme & Explore | explore-redesign]: Added search form in menu (navbar) in landing pages. 1. search.less: Added css for modifier .small-vertical for .input-wrapper of . 2. layout.service.ts: Added hasMenuSearchBarSubject: BehaviorSubject = new BehaviorSubject(false), parsing and getter/setter methods. 3. navigationBar.module.ts: Imported SearchInputModule. 4. navigationBar.component.ts: a. Added searchMode: boolean = false; and hasSearchBar: boolean = false; (and other helpful fields) b. Subscribe to queryParams to hide search bar and reset keyword | Subscribe to layoutService.hasMenuSearchBar to check if search should be included in navbar or not. c. Added methods "openSearch()" to show the search form and "goTo()" to trigger the search action and navigate to the search page. 5. navigationBar.component.html: Added
and search-icon button to show search bar | Added checks if searchMode is enabled (search form visible) or not. 6. app-routing.module.ts: In routes for landing pages added in data: hasMenuSearchBar: true. --- explore/src/app/app-routing.module.ts | 16 ++++++++-------- explore/src/app/openaireLibrary | 2 +- explore/src/assets/openaire-theme | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/explore/src/app/app-routing.module.ts b/explore/src/app/app-routing.module.ts index a771bf27..dfd6c7fb 100644 --- a/explore/src/app/app-routing.module.ts +++ b/explore/src/app/app-routing.module.ts @@ -15,21 +15,21 @@ const routes: Routes = [ {path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)}, {path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)}, // Landing Pages - {path: 'search/result', loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule), data: {hasQuickContact: false}}, - {path: 'search/publication', loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule), data: {hasQuickContact: false}}, - {path: 'search/dataset', loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule), data: {hasQuickContact: false}}, - {path: 'search/software', loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule), data: {hasQuickContact: false}}, - {path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), data: {hasQuickContact: false}}, - {path: 'search/project', loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule), data: {hasQuickContact: false}}, + {path: 'search/result', loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/publication', loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/dataset', loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/software', loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/project', loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, { path: 'search/dataprovider', loadChildren: () => import('././landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule), - data: {hasQuickContact: false} + data: {hasQuickContact: false, hasMenuSearchBar: true} }, { path: 'search/organization', loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule), - data: {hasQuickContact: false} + data: {hasQuickContact: false, hasMenuSearchBar: true} }, { path: 'project-report', diff --git a/explore/src/app/openaireLibrary b/explore/src/app/openaireLibrary index cf42f3a1..aef1a25a 160000 --- a/explore/src/app/openaireLibrary +++ b/explore/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit cf42f3a12298a2c99cd472aa2fd33ba00ded1f7f +Subproject commit aef1a25a820b9a3e77780ff93eca0b086a2d32f2 diff --git a/explore/src/assets/openaire-theme b/explore/src/assets/openaire-theme index aa1e6c9d..4e9e2b25 160000 --- a/explore/src/assets/openaire-theme +++ b/explore/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit aa1e6c9df390a4ba0919b5f8591374f7eec75089 +Subproject commit 4e9e2b25e12cf346c8553a42f012644a1fa8d16a