diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index bf53c7e8..570cd7db 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -46,8 +46,6 @@ placeholder="Type keywords..." [(ngModel)]="selectedField.value" name="value[{{i}}]"> - -
-
+ @@ -173,10 +171,18 @@ [(value)]="selectedFields[0].value" tooltip="true">
+ [placeholder]="formPlaceholderText" (searchEmitter)="simpleKeywordChanged()" [iconPosition]="isMobile?'left':'right'"> + + + +
+ [placeholder]="formPlaceholderText" (searchEmitter)="simpleKeywordChanged()" [iconPosition]="isMobile?'left':'right'"> + + + +
diff --git a/searchPages/searchUtils/advancedSearchForm.component.ts b/searchPages/searchUtils/advancedSearchForm.component.ts index 2e872014..1b1fc5ce 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.ts +++ b/searchPages/searchUtils/advancedSearchForm.component.ts @@ -41,6 +41,7 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges @Output() queryChange = new EventEmitter(); @Input() resultTypes; @Input() quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string }; + @Input() isMobile: boolean = false; public disableSelect: boolean = false; validDateFrom: boolean = true; validDateTo: boolean = true; @@ -60,6 +61,7 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges selectedEntityAdvancedUrl; @Input() entitiesSelection: boolean; @Input() showSwitchSearchLink: boolean = true; + @Output() filtersClicked: EventEmitter = new EventEmitter(); sub; constructor(private route: ActivatedRoute, private router: Router, private cdr: ChangeDetectorRef) {} diff --git a/searchPages/searchUtils/advancedSearchForm.module.ts b/searchPages/searchUtils/advancedSearchForm.module.ts index 0b6a5dd6..d9cf2b9b 100644 --- a/searchPages/searchUtils/advancedSearchForm.module.ts +++ b/searchPages/searchUtils/advancedSearchForm.module.ts @@ -10,26 +10,30 @@ import {DateFilterModule} from './dateFilter.module'; import {SearchFormModule} from './searchForm.module'; import {QuickSelectionsModule} from "./quick-selections.module"; import {EntitiesSelectionModule} from "./entitiesSelection.module"; -import { MatSelectModule } from "@angular/material/select"; +import {MatSelectModule} from "@angular/material/select"; import {IconsModule} from "../../utils/icons/icons.module"; import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module"; import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module"; import {InputModule} from "../../sharedComponents/input/input.module"; +import {IconsService} from "../../utils/icons/icons.service"; +import {filters} from "../../utils/icons/icons"; @NgModule({ imports: [ - CommonModule, FormsModule, RouterModule, EntitiesAutocompleteModule, StaticAutocompleteModule, DateFilterModule, SearchFormModule, QuickSelectionsModule, EntitiesSelectionModule, MatSelectModule, IconsModule, SearchInputModule, AdvancedSearchInputModule, InputModule + CommonModule, FormsModule, RouterModule, EntitiesAutocompleteModule, StaticAutocompleteModule, DateFilterModule, + SearchFormModule, QuickSelectionsModule, EntitiesSelectionModule, MatSelectModule, IconsModule, SearchInputModule, AdvancedSearchInputModule, InputModule ], declarations: [ AdvancedSearchFormComponent, -], - - providers:[ ], exports: [ AdvancedSearchFormComponent - - ] + + ] }) -export class AdvancedSearchFormModule { } +export class AdvancedSearchFormModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([filters]); + } +} diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index 8281c437..b2e4ed18 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -3,7 +3,7 @@
-
    +
      @@ -113,56 +113,81 @@
- -
+
+
+
+
+
+
+ + +
+
+ + +
+ + + +
-
-
-
-
- +
+
+
+
+ +
-
-
-
-
-
- - +
+
+
+
+ + +
-
- -
- - - - -
+ +
+ + + + +
@@ -172,34 +197,19 @@
-
- - - - - - - - - - - - - - - Filters - ({{(selectedRangeFilters + selectedFilters)}}) - - -
-
+
+
+
-
- +
+
+ +
+
+ +
@@ -207,33 +217,33 @@
-
-
- -
-
+
+
+
+
+
+ +
+
+
+ class="uk-alert uk-animation-slide-top-small"> Do you want to see results only for {{customFilter.valueName}}? Click here.
+ class="uk-alert uk-margin-small-top "> The following results are related to {{customFilter.valueName}}. Are you interested to view more results? Visit @@ -242,7 +252,7 @@ [href]="openaireLink+this.routerHelper.createQueryParamsString(this.parameterNames, this.parameterValues)" target="_blank"> OpenAIRE - Explore.
-
+
@@ -268,72 +278,52 @@
-
+
-
-
-
-
-
-
- - -
-
- - -
-
- - - - - - - - +
+

For more results please try a new, more specific query

+
+
+ + + + + + + + +
+
+ [searchUtils]="searchUtils" [results]="results" [baseUrl]="searchUtils.baseUrl" + [parameterNames]="parameterNames" [parameterValues]="parameterValues" + [isDisabled]="disabled" [isMobile]="mobile">
@@ -341,24 +331,31 @@
- Powered by - OpenAIRE Research Graph - + Powered by + OpenAIRE Research Graph +
- - Last update - Last update - of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} - + + Last update + Last update + of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} +
-
+
- + +
+ +
+ +
+
+
diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index 69163faa..6f6e5c10 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -1,15 +1,15 @@ import { ChangeDetectorRef, Component, - ElementRef, + ElementRef, Inject, Input, OnChanges, OnDestroy, - OnInit, + OnInit, PLATFORM_ID, SimpleChanges, ViewChild } from '@angular/core'; -import {Location} from '@angular/common'; +import {isPlatformServer, Location} from '@angular/common'; import {ActivatedRoute, Router} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser'; @@ -35,6 +35,8 @@ import {AlertModal} from "../../utils/modal/alert"; import {Subscriber} from "rxjs"; import {IndexInfoService} from "../../utils/indexInfo.service"; import {Background} from "../../utils/background-utils"; +import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service"; +import {Platform} from "@angular/cdk/platform"; export interface SearchForm extends Background {} @@ -147,13 +149,8 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { currentFilterToRemove; public indexUpdateDate: Date; showOffCanvas:boolean = false; - // public resultsPerPageOptions = [ - // {label: '5', value: '5'}, - // {label: '10', value: '10'}, - // {label: '20', value: '20'}, - // {label: '50', value: '50'}, - // ]; - + isMobile: boolean = false; + isServer: boolean; constructor(private route: ActivatedRoute, private location: Location, @@ -163,7 +160,10 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { private router: Router, private seoService: SEOService, private helper: HelperService, + private layoutService: LayoutService, + @Inject(PLATFORM_ID) private platform: any, private cdr: ChangeDetectorRef, private indexInfoService: IndexInfoService) { + this.isServer = isPlatformServer(this.platform); } ngOnInit() { @@ -178,6 +178,10 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter && this.piwikSiteId) { this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe()); } + this.layoutService.isMobile.subscribe(isMobile => { + this.isMobile = isMobile; + this.cdr.detectChanges(); + }); this.route.queryParams.subscribe(params => { if (params['page'] && params['page'] != 1) { HelperFunctions.scrollToId("searchForm"); diff --git a/searchPages/searchUtils/portal-search-result.component.html b/searchPages/searchUtils/portal-search-result.component.html index 3a3b6c91..542dd13b 100644 --- a/searchPages/searchUtils/portal-search-result.component.html +++ b/searchPages/searchUtils/portal-search-result.component.html @@ -1,71 +1,40 @@ -
  • -
    -
    - Member -
    -
    - - restricted -
    -
    - - private -
    -
    - - {{result.visibility.toLowerCase()}} +
    + Member +
    +
    +
    + + restricted
    + + + private + + + + {{result.visibility.toLowerCase()}} +
    - - - - - - -
    - -
    - - +
    + + +
    Creation Date: @@ -78,10 +47,21 @@ {{mapType(result.type)}}
    -
    +

    +
    + + + + + + +
    + +
    +
    diff --git a/searchPages/searchUtils/portal-search-result.component.less b/searchPages/searchUtils/portal-search-result.component.less index 0381bcbf..e43a61fd 100644 --- a/searchPages/searchUtils/portal-search-result.component.less +++ b/searchPages/searchUtils/portal-search-result.component.less @@ -1,23 +1,42 @@ @import (reference) "~src/assets/openaire-theme/less/color.less"; +@import (reference) "~src/assets/openaire-theme/less/_import-variables.less"; -.setType(@color) { - border-left: 4px solid fade(@color, 30%); +.setType(@color, @position: left) { + border-@{position}: 4px solid fade(@color, 30%); & .type { color: @color; } } -.uk-card { - &.funder { - .setType(@funder-color); - } +@media(min-width: @breakpoint-medium) { + .uk-card { + &.funder { + .setType(@funder-color); + } - &.ri { - .setType(@ri-color); - } + &.ri { + .setType(@ri-color); + } - &.organization { - .setType(@organization-color); + &.organization { + .setType(@organization-color); + } } -} \ No newline at end of file +} + +@media(max-width: @breakpoint-small-max) { + .uk-card { + &.funder { + .setType(@funder-color, bottom); + } + + &.ri { + .setType(@ri-color, bottom); + } + + &.organization { + .setType(@organization-color, bottom); + } + } +} diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts index dfc77c92..cbf85974 100644 --- a/searchPages/searchUtils/portal-search-result.component.ts +++ b/searchPages/searchUtils/portal-search-result.component.ts @@ -22,6 +22,7 @@ export class PortalSearchResultComponent implements OnInit{ @Input() showLoading: boolean = false; @Input() custom_class: string = "search-results"; @Input() properties: EnvProperties; + @Input() isMobile: boolean = false; @ViewChild('AlertModal') modal; visibilityIcon: Map = new Map ([ ["PRIVATE", 'incognito'], diff --git a/searchPages/searchUtils/searchPaging.component.ts b/searchPages/searchUtils/searchPaging.component.ts index 3b4ea350..3eef9913 100644 --- a/searchPages/searchUtils/searchPaging.component.ts +++ b/searchPages/searchUtils/searchPaging.component.ts @@ -4,13 +4,13 @@ import {ErrorCodes} from '../../utils/properties/errorCodes'; @Component({ selector: 'search-paging', template: ` - @@ -26,6 +26,7 @@ export class SearchPagingComponent { @Input() parameterValues: string[]; @Input() loadPaging: boolean = true; @Input() oldTotalResults: number = 0; + @Input() isMobile: boolean = false; public totalResults: number = 0; public errorCodes: ErrorCodes = new ErrorCodes(); diff --git a/sharedComponents/search-input/search-input.component.ts b/sharedComponents/search-input/search-input.component.ts index af744175..818da42a 100644 --- a/sharedComponents/search-input/search-input.component.ts +++ b/sharedComponents/search-input/search-input.component.ts @@ -22,7 +22,7 @@ import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive"; [class.collapsed]="hidden" [ngClass]="searchInputClass">
    -
    @@ -36,6 +36,9 @@ import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive";
    +
    + +