Merge from origin/develop
This commit is contained in:
commit
6d7f6eca72
File diff suppressed because one or more lines are too long
|
@ -60,10 +60,10 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
<span>{{year}}</span>
|
<span>{{year}}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="startYear && !endYear">
|
<ng-container *ngIf="startYear && !endYear">
|
||||||
<span>{{startYear}}</span>
|
<span>From {{startYear}}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!startYear && endYear">
|
<ng-container *ngIf="!startYear && endYear">
|
||||||
<span>{{endYear}}</span>
|
<span>Until {{endYear}}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="startYear && endYear">
|
<ng-container *ngIf="startYear && endYear">
|
||||||
<ng-container>
|
<ng-container>
|
||||||
|
|
|
@ -464,6 +464,7 @@ export class ProjectComponent {
|
||||||
this.subscriptions.push(this._projectService.getProjectInfo(id, this.properties).subscribe(
|
this.subscriptions.push(this._projectService.getProjectInfo(id, this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.projectInfo = data;
|
this.projectInfo = data;
|
||||||
|
this.projectInfo.id = this.projectId;
|
||||||
|
|
||||||
this.actionsAfterGettingProjectInfo();
|
this.actionsAfterGettingProjectInfo();
|
||||||
},
|
},
|
||||||
|
|
|
@ -163,7 +163,7 @@ export class MyOrcidLinksComponent {
|
||||||
|
|
||||||
if(typeof document !== 'undefined') {
|
if(typeof document !== 'undefined') {
|
||||||
this.tokenUrl = properties.orcidTokenURL
|
this.tokenUrl = properties.orcidTokenURL
|
||||||
+ "clientid="+properties.orcidClientId
|
+ "client_id=" + properties.orcidClientId
|
||||||
// + "&response_type=code&scope=/activities/update"
|
// + "&response_type=code&scope=/activities/update"
|
||||||
// + "&response_type=code&scope=/authenticate /activities/update /person/update /read-limited"
|
// + "&response_type=code&scope=/authenticate /activities/update /person/update /read-limited"
|
||||||
+ "&response_type=code&scope=/activities/update /read-limited"
|
+ "&response_type=code&scope=/activities/update /read-limited"
|
||||||
|
|
|
@ -160,7 +160,9 @@ export class SearchResearchResultsComponent {
|
||||||
|
|
||||||
this.searchUtils.validateSize(params['size']);
|
this.searchUtils.validateSize(params['size']);
|
||||||
this.searchUtils.sortBy = (params['sortBy']) ? params['sortBy'] : '';
|
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.searchUtils.sortBy = "";
|
||||||
}
|
}
|
||||||
this.selectedFields = [];
|
this.selectedFields = [];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||||
import {Option} from "../../sharedComponents/input/input.component";
|
import {Option} from "../../sharedComponents/input/input.component";
|
||||||
|
import {properties} from "../../../../environments/environment";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'search-sorting',
|
selector: 'search-sorting',
|
||||||
|
@ -19,11 +20,21 @@ export class SearchSortingComponent {
|
||||||
@Input() entityType: string = '';
|
@Input() entityType: string = '';
|
||||||
@Output() sortByChange = new EventEmitter();
|
@Output() sortByChange = new EventEmitter();
|
||||||
public options: Option[];
|
public options: Option[];
|
||||||
private generalOptions = [
|
private generalOptions = properties.environment != "production" ?
|
||||||
{value: '', label: 'Relevance'},
|
[
|
||||||
{value: 'resultdateofacceptance,descending', label: 'Date (most recent)'},
|
{value: '', label: 'Relevance'},
|
||||||
{value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'},
|
{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 = [
|
private communityOptions = [
|
||||||
{value: '', label: 'Title'},
|
{value: '', label: 'Title'},
|
||||||
{value: 'creationdate,descending', label: 'Creation Date (most recent)'},
|
{value: 'creationdate,descending', label: 'Creation Date (most recent)'},
|
||||||
|
|
|
@ -248,10 +248,10 @@ export class SearchProjectsService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(resData.hasOwnProperty("startdate")) {
|
if(resData.hasOwnProperty("startdate") && resData['startdate']) {
|
||||||
result.startYear = resData.startdate.split('-')[0];
|
result.startYear = resData.startdate.split('-')[0];
|
||||||
}
|
}
|
||||||
if(resData.hasOwnProperty("enddate")) {
|
if(resData.hasOwnProperty("enddate") && resData['enddate']) {
|
||||||
result.endYear = resData.enddate.split('-')[0];
|
result.endYear = resData.enddate.split('-')[0];
|
||||||
}
|
}
|
||||||
// Measure
|
// Measure
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
<img class="uk-width-medium" [src]="properties.enermapsURL +'/images/datasets/' + result.enermapsId + '.png'"
|
<img class="uk-width-medium" [src]="properties.enermapsURL +'/images/datasets/' + result.enermapsId + '.png'"
|
||||||
alt="Enermaps tool preview" loading="lazy">
|
alt="Enermaps tool preview" loading="lazy">
|
||||||
<div
|
<div
|
||||||
class="uk-overlay uk-margin-medium-left uk-overlay-default uk-position-bottom uk-hidden-hover uk-padding-small">
|
class="uk-overlay uk-margin-medium-left uk-overlay-default uk-position-bottom uk-hidden-hover uk-padding-small">
|
||||||
<p>Visit <a
|
<p>Visit <a
|
||||||
class="custom-external uk-margin-right uk-margin-small-top"
|
class="custom-external uk-margin-right uk-margin-small-top"
|
||||||
[href]="properties.enermapsURL + '/?shared_id=' + result.enermapsId" target="_blank">
|
[href]="properties.enermapsURL + '/?shared_id=' + result.enermapsId" target="_blank">
|
||||||
Enermaps tool
|
Enermaps tool
|
||||||
</a></p>
|
</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
||||||
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
||||||
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
||||||
[routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand">
|
[routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand">
|
||||||
<div *ngIf="(result.title) || result.acronym">
|
<div *ngIf="(result.title) || result.acronym">
|
||||||
<span *ngIf="result.acronym">
|
<span *ngIf="result.acronym">
|
||||||
{{result.acronym}}
|
{{result.acronym}}
|
||||||
|
@ -37,8 +37,8 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="externalUrl && result.id" (click)="onClick()"
|
<a *ngIf="externalUrl && result.id" (click)="onClick()"
|
||||||
target="_blank" [href]="externalUrl+result.id"
|
target="_blank" [href]="externalUrl+result.id"
|
||||||
class="custom-external uk-link uk-text-decoration-none uk-width-expand">
|
class="custom-external uk-link uk-text-decoration-none uk-width-expand">
|
||||||
<span *ngIf="(result.title) || result.acronym">
|
<span *ngIf="(result.title) || result.acronym">
|
||||||
<span *ngIf="result.acronym">
|
<span *ngIf="result.acronym">
|
||||||
{{result.acronym}}
|
{{result.acronym}}
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<div *ngIf="result.funderShortname || result.code" class="uk-margin-xsmall-bottom">
|
<div *ngIf="result.funderShortname || result.code" class="uk-margin-xsmall-bottom">
|
||||||
<span *ngIf="result.funderShortname">
|
<span *ngIf="result.funderShortname">
|
||||||
<span class="uk-text-meta">Funder: </span>
|
<span class="uk-text-meta">Funder: </span>
|
||||||
{{result.funderShortname}}
|
{{result.funderShortname}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="result.code" [class.uk-margin-left]="result.funderShortname">
|
<span *ngIf="result.code" [class.uk-margin-left]="result.funderShortname">
|
||||||
<span class="uk-text-meta">{{openaireEntities.PROJECT}} Code: </span>
|
<span class="uk-text-meta">{{openaireEntities.PROJECT}} Code: </span>
|
||||||
|
@ -112,8 +112,8 @@
|
||||||
<div *ngIf="result.budget || result.contribution" class="uk-margin-xsmall-bottom">
|
<div *ngIf="result.budget || result.contribution" class="uk-margin-xsmall-bottom">
|
||||||
<span *ngIf="result.budget">
|
<span *ngIf="result.budget">
|
||||||
<span class="uk-text-meta">Overall Budget: </span>
|
<span class="uk-text-meta">Overall Budget: </span>
|
||||||
{{result.budget | number}}
|
{{result.budget | number}}
|
||||||
<span *ngIf="result.currency">{{result.currency}}</span>
|
<span *ngIf="result.currency">{{result.currency}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="result.contribution" [class.uk-margin-left]="result.budget">
|
<span *ngIf="result.contribution" [class.uk-margin-left]="result.budget">
|
||||||
<span class="uk-text-meta">Funder Contribution: </span>
|
<span class="uk-text-meta">Funder Contribution: </span>
|
||||||
|
@ -172,11 +172,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="(result.hostedBy_collectedFrom || hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal"
|
<div *ngIf="(result.hostedBy_collectedFrom || hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal"
|
||||||
class="uk-text-small uk-margin-top" [class.uk-border-bottom]="!isMobile">
|
class="uk-text-small uk-margin-top" [class.uk-border-bottom]="!isMobile">
|
||||||
<div uk-grid class="uk-grid uk-grid-small uk-text-xsmall uk-flex-middle uk-margin-xsmall-bottom"
|
<div uk-grid class="uk-grid uk-grid-small uk-text-xsmall uk-flex-middle uk-margin-xsmall-bottom"
|
||||||
[class.uk-flex-between]="(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
[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-flex-right]="!(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
||||||
[class.uk-grid-divider]="!isMobile">
|
[class.uk-grid-divider]="!isMobile">
|
||||||
<div *ngIf="result.hostedBy_collectedFrom?.length" class="uk-width-auto uk-visible@m">
|
<div *ngIf="result.hostedBy_collectedFrom?.length" class="uk-width-auto uk-visible@m">
|
||||||
<availableOn [availableOn]="result.hostedBy_collectedFrom"></availableOn>
|
<availableOn [availableOn]="result.hostedBy_collectedFrom"></availableOn>
|
||||||
</div>
|
</div>
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers">
|
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers">
|
||||||
</orcid-work>
|
</orcid-work>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="orcid" class="uk-width-expand uk-text-right">
|
<span *ngIf="orcid" class="uk-width-expand uk-text-right">
|
||||||
<span *ngIf="result.orcidCreationDates?.length > 0" class="uk-display-inline-block">
|
<span *ngIf="result.orcidCreationDates?.length > 0" class="uk-display-inline-block">
|
||||||
<span class="uk-text-meta">
|
<span class="uk-text-meta">
|
||||||
Added in ORCID:
|
Added in ORCID:
|
||||||
|
@ -209,12 +209,13 @@
|
||||||
</entity-actions>
|
</entity-actions>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="result.measure?.bip.length || result.measure?.counts.length"
|
<div *ngIf="result.measure?.bip.length || result.measure?.counts.length"
|
||||||
class="uk-text-xsmall uk-width-auto metrics uk-flex uk-flex-middle uk-flex-right uk-text-meta">
|
class="uk-text-xsmall uk-width-auto metrics uk-flex uk-flex-middle uk-flex-right uk-text-meta">
|
||||||
<ng-container *ngIf="result.measure?.bip.length">
|
<ng-container *ngIf="result.measure?.bip.length">
|
||||||
<a class="uk-flex uk-flex-middle uk-link-reset">
|
<a class="uk-flex uk-flex-middle uk-link-reset">
|
||||||
<icon customClass="bip-icon-hover" [flex]="true" [ratio]="0.7"
|
<icon customClass="bip-icon-hover" [flex]="true" [ratio]="0.7"
|
||||||
[name]="result.measure.bip[0].icon"></icon>
|
[name]="result.measure.bip[0].icon"></icon>
|
||||||
<span class="uk-margin-xsmall-left">{{result.measure.bip[0].value}}</span>
|
<span *ngIf="isNumber(result.measure.bip[0].value)" class="uk-margin-xsmall-left">{{formatNumber(result.measure.bip[0].value)}}</span>
|
||||||
|
<span *ngIf="!isNumber(result.measure.bip[0].value)" class="uk-margin-xsmall-left">{{result.measure.bip[0].value}}</span>
|
||||||
</a>
|
</a>
|
||||||
<div uk-drop="pos: top-right" class="uk-drop">
|
<div uk-drop="pos: top-right" class="uk-drop">
|
||||||
<div class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
<div class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||||
|
@ -223,8 +224,8 @@
|
||||||
<td class="bip-icon">
|
<td class="bip-icon">
|
||||||
<icon [flex]="true" [ratio]="0.7" [name]="metric.icon"></icon>
|
<icon [flex]="true" [ratio]="0.7" [name]="metric.icon"></icon>
|
||||||
</td>
|
</td>
|
||||||
<td class="uk-text-capitalize">{{metric.name}}</td>
|
<td *ngIf="isNumber(metric.value)" class="uk-text-bolder">{{metric.value | number}}</td>
|
||||||
<td class="uk-text-bolder">{{metric.value}}</td>
|
<td *ngIf="!isNumber(metric.value)" class="uk-text-bolder">{{metric.value}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="uk-margin-top uk-flex uk-flex-middle uk-flex-center">
|
<div class="uk-margin-top uk-flex uk-flex-middle uk-flex-center">
|
||||||
|
@ -254,7 +255,7 @@
|
||||||
<div class="uk-margin-top uk-flex uk-flex-middle uk-flex-center">
|
<div class="uk-margin-top uk-flex uk-flex-middle uk-flex-center">
|
||||||
<span class="uk-text-uppercase">Powered by </span>
|
<span class="uk-text-uppercase">Powered by </span>
|
||||||
<img class="uk-margin-xsmall-left" width="15" src="assets/common-assets/logo-small-usage-counts.png"
|
<img class="uk-margin-xsmall-left" width="15" src="assets/common-assets/logo-small-usage-counts.png"
|
||||||
loading="lazy" alt="BIP!">
|
loading="lazy" alt="Usage counts">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
|
@ -223,6 +223,10 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
return formatted.number + formatted.size;
|
return formatted.number + formatted.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public isNumber(value): boolean {
|
||||||
|
return typeof value === 'number';
|
||||||
|
}
|
||||||
|
|
||||||
public getAccessLabel(accessRight) : string {
|
public getAccessLabel(accessRight) : string {
|
||||||
if(accessRight) {
|
if(accessRight) {
|
||||||
return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access"));
|
return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access"));
|
||||||
|
|
Loading…
Reference in New Issue