From 966dedde45872fee8f9e55d90d7dbb0e367c9c75 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 20 Sep 2023 10:48:20 +0300 Subject: [PATCH] [Library | develop]: searchSorting.component.ts: Added sorting options (generalOptions), "citation_count,descending", "popularity,descending", "influence,descending", "impulse,descending" | searchResearchResults.component.ts: Added the new sorting options in the checks. --- searchPages/searchResearchResults.component.ts | 4 +++- searchPages/searchUtils/searchSorting.component.ts | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/searchPages/searchResearchResults.component.ts b/searchPages/searchResearchResults.component.ts index 5e4e3c59..f4f03fa7 100644 --- a/searchPages/searchResearchResults.component.ts +++ b/searchPages/searchResearchResults.component.ts @@ -160,7 +160,9 @@ export class SearchResearchResultsComponent { this.searchUtils.validateSize(params['size']); this.searchUtils.sortBy = (params['sortBy']) ? params['sortBy'] : ''; - if (this.searchUtils.sortBy && this.searchUtils.sortBy != "resultdateofacceptance,descending" && this.searchUtils.sortBy != "resultdateofacceptance,ascending") { + if (this.searchUtils.sortBy && this.searchUtils.sortBy != "resultdateofacceptance,descending" && this.searchUtils.sortBy != "resultdateofacceptance,ascending" + && this.searchUtils.sortBy != "citation_count,descending" && this.searchUtils.sortBy != "popularity,descending" + && this.searchUtils.sortBy != "influence,descending" && this.searchUtils.sortBy != "impulse,descending") { this.searchUtils.sortBy = ""; } this.selectedFields = []; diff --git a/searchPages/searchUtils/searchSorting.component.ts b/searchPages/searchUtils/searchSorting.component.ts index f70ac1cf..7a1e7fe8 100644 --- a/searchPages/searchUtils/searchSorting.component.ts +++ b/searchPages/searchUtils/searchSorting.component.ts @@ -23,6 +23,10 @@ export class SearchSortingComponent { {value: '', label: 'Relevance'}, {value: 'resultdateofacceptance,descending', label: 'Date (most recent)'}, {value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'}, + {value: 'citation_count,descending', label: 'Citation Count'}, + {value: 'popularity,descending', label: 'Popularity'}, + {value: 'influence,descending', label: 'Influence'}, + {value: 'impulse,descending', label: 'Impulse'} ]; private communityOptions = [ {value: '', label: 'Title'},