From 6958a8ef9b2e76d689ba0fc161bce5e4b4a45a87 Mon Sep 17 00:00:00 2001 From: argirok Date: Mon, 18 Sep 2023 12:23:33 +0300 Subject: [PATCH 1/8] fix parameter for grant openaire access to Orcid --- orcid/my-orcid-links/myOrcidLinks.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orcid/my-orcid-links/myOrcidLinks.component.ts b/orcid/my-orcid-links/myOrcidLinks.component.ts index d77e14a4..5fbe58b8 100644 --- a/orcid/my-orcid-links/myOrcidLinks.component.ts +++ b/orcid/my-orcid-links/myOrcidLinks.component.ts @@ -163,7 +163,7 @@ export class MyOrcidLinksComponent { if(typeof document !== 'undefined') { this.tokenUrl = properties.orcidTokenURL - + "clientid="+properties.orcidClientId + + "client_id=" + properties.orcidClientId // + "&response_type=code&scope=/activities/update" // + "&response_type=code&scope=/authenticate /activities/update /person/update /read-limited" + "&response_type=code&scope=/activities/update /read-limited" From adae1f074953b1316956cd7a7964a5bb76933426 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 19 Sep 2023 16:38:16 +0300 Subject: [PATCH 2/8] [Library | develop]: searchProjects.service.ts: Added more checks if startdate and enddate properties exist in the response | entity-metadata.component.ts: Added "From" or "Until" before startYear and endYear respectively when only one of them exists in data. --- landingPages/landing-utils/entity-metadata.component.ts | 4 ++-- services/searchProjects.service.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts index c15f50e0..aba2fc82 100644 --- a/landingPages/landing-utils/entity-metadata.component.ts +++ b/landingPages/landing-utils/entity-metadata.component.ts @@ -60,10 +60,10 @@ import {RouterHelper} from "../../utils/routerHelper.class"; {{year}} - {{startYear}} + From {{startYear}} - {{endYear}} + Until {{endYear}} diff --git a/services/searchProjects.service.ts b/services/searchProjects.service.ts index 2109666f..b513b737 100644 --- a/services/searchProjects.service.ts +++ b/services/searchProjects.service.ts @@ -248,10 +248,10 @@ export class SearchProjectsService { } } } - if(resData.hasOwnProperty("startdate")) { + if(resData.hasOwnProperty("startdate") && resData['startdate']) { result.startYear = resData.startdate.split('-')[0]; } - if(resData.hasOwnProperty("enddate")) { + if(resData.hasOwnProperty("enddate") && resData['enddate']) { result.endYear = resData.enddate.split('-')[0]; } // Measure From be187c3fed3aac65731a9f7d7a1e10efa7a78346 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 19 Sep 2023 16:40:56 +0300 Subject: [PATCH 3/8] [Library | develop]: citation.class.ts: Updated bibtex to include case for type="software" - add @software instead of @misc. --- landingPages/landing-utils/citeThis/citation.class.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/landingPages/landing-utils/citeThis/citation.class.ts b/landingPages/landing-utils/citeThis/citation.class.ts index 986b9244..03a3766c 100644 --- a/landingPages/landing-utils/citeThis/citation.class.ts +++ b/landingPages/landing-utils/citeThis/citation.class.ts @@ -6,7 +6,7 @@ export class Citation{ public fileSuffix:string[]=[".bib", ".ris"]; public fileFormatOptions: Option[]=[{label: "bibtex (.bib)", value: "bibtex"}, {label: "ris (.ris)", value: "ris"}]; //https://github.com/citation-style-language/styles - bibtex:string =``; + bibtex:string =``; ieee:string =` `; chicago:string =` `; science:string =' '; From 46a8928a208989cc37b5ec416745148fd8b05e0d Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 19 Sep 2023 16:45:17 +0300 Subject: [PATCH 4/8] [Library | develop]: project.component.ts: [Bug fix] In method "getProjectInfo()", added this.projectInfo.id = this.projectId; - direct link action button was not working, id was missing. --- landingPages/project/project.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 34936cd8..4e7eb8ba 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -464,6 +464,7 @@ export class ProjectComponent { this.subscriptions.push(this._projectService.getProjectInfo(id, this.properties).subscribe( data => { this.projectInfo = data; + this.projectInfo.id = this.projectId; this.actionsAfterGettingProjectInfo(); }, From bc514b62d121ec7e1e7a06b5c016d99bf72c5fc6 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 19 Sep 2023 16:48:08 +0300 Subject: [PATCH 5/8] [Library | develop]: result-preview.component.ts: Added method "isNumber()" | resultLanding.component.html: [Bug fix] Updated view of bip indicators - format the numbers correctly. --- utils/result-preview/result-preview.component.html | 8 +++++--- utils/result-preview/result-preview.component.ts | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index d8608abb..04f65a8f 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -214,7 +214,8 @@ - {{result.measure.bip[0].value}} + {{formatNumber(result.measure.bip[0].value)}} + {{result.measure.bip[0].value}}
@@ -223,7 +224,8 @@ - + +
{{metric.name}}{{metric.value}}{{metric.value | number}}{{metric.value}}
@@ -252,7 +254,7 @@
Powered by BIP! + loading="lazy" alt="Usage counts">
diff --git a/utils/result-preview/result-preview.component.ts b/utils/result-preview/result-preview.component.ts index 9c041854..6352e9b9 100644 --- a/utils/result-preview/result-preview.component.ts +++ b/utils/result-preview/result-preview.component.ts @@ -223,6 +223,10 @@ export class ResultPreviewComponent implements OnInit, OnChanges { return formatted.number + formatted.size; } + public isNumber(value): boolean { + return typeof value === 'number'; + } + public getAccessLabel(accessRight) : string { if(accessRight) { return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access")); From 966dedde45872fee8f9e55d90d7dbb0e367c9c75 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 20 Sep 2023 10:48:20 +0300 Subject: [PATCH 6/8] [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'}, From 0d22ba8a3b119c43537e94317b4f2a0f4b35757b Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 20 Sep 2023 14:13:34 +0300 Subject: [PATCH 7/8] [Library | develop]: searchSorting.component.ts: Do not add new sorting options in production yet. --- .../searchUtils/searchSorting.component.ts | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/searchPages/searchUtils/searchSorting.component.ts b/searchPages/searchUtils/searchSorting.component.ts index 7a1e7fe8..e75e3930 100644 --- a/searchPages/searchUtils/searchSorting.component.ts +++ b/searchPages/searchUtils/searchSorting.component.ts @@ -1,5 +1,6 @@ import {Component, Input, Output, EventEmitter} from '@angular/core'; import {Option} from "../../sharedComponents/input/input.component"; +import {properties} from "../../../../environments/environment"; @Component({ selector: 'search-sorting', @@ -19,15 +20,21 @@ export class SearchSortingComponent { @Input() entityType: string = ''; @Output() sortByChange = new EventEmitter(); public options: Option[]; - private generalOptions = [ - {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 generalOptions = properties.environment != "production" ? + [ + {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'} + ] : + [ + {value: '', label: 'Relevance'}, + {value: 'resultdateofacceptance,descending', label: 'Date (most recent)'}, + {value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'} + ]; private communityOptions = [ {value: '', label: 'Title'}, {value: 'creationdate,descending', label: 'Creation Date (most recent)'}, From d10df32853e4ffa29add4447f5a69ea1b8e8722f Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 26 Sep 2023 11:38:09 +0300 Subject: [PATCH 8/8] Result Preview: Fix space betwwen ngIf and class. --- utils/result-preview/result-preview.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 04f65a8f..c4574c8d 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -225,7 +225,7 @@ {{metric.name}} {{metric.value | number}} - {{metric.value}} + {{metric.value}}