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 =' '; 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/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(); }, 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" 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..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,11 +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)'}, - ]; + 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)'}, 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 diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 5bc75d3f..6323db7c 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -7,10 +7,10 @@ Enermaps tool preview
+ class="uk-overlay uk-margin-medium-left uk-overlay-default uk-position-bottom uk-hidden-hover uk-padding-small">

Visit + class="custom-external uk-margin-right uk-margin-small-top" + [href]="properties.enermapsURL + '/?shared_id=' + result.enermapsId" target="_blank"> Enermaps tool

@@ -23,7 +23,7 @@

+ [routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand">
{{result.acronym}} @@ -37,8 +37,8 @@
+ target="_blank" [href]="externalUrl+result.id" + class="custom-external uk-link uk-text-decoration-none uk-width-expand"> {{result.acronym}} @@ -96,7 +96,7 @@
Funder: - {{result.funderShortname}} + {{result.funderShortname}} {{openaireEntities.PROJECT}} Code: @@ -112,8 +112,8 @@
Overall Budget: - {{result.budget | number}} - {{result.currency}} + {{result.budget | number}} + {{result.currency}} Funder Contribution: @@ -172,11 +172,11 @@
+ class="uk-text-small uk-margin-top" [class.uk-border-bottom]="!isMobile">
+ [class.uk-flex-between]="(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)" + [class.uk-flex-right]="!(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)" + [class.uk-grid-divider]="!isMobile">
@@ -193,7 +193,7 @@ [putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"> - + Added in ORCID: @@ -209,12 +209,13 @@
+ class="uk-text-xsmall uk-width-auto metrics uk-flex uk-flex-middle uk-flex-right uk-text-meta"> - {{result.measure.bip[0].value}} + {{formatNumber(result.measure.bip[0].value)}} + {{result.measure.bip[0].value}}
@@ -223,8 +224,8 @@ - {{metric.name}} - {{metric.value}} + {{metric.value | number}} + {{metric.value}}
@@ -254,7 +255,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"));