();
+ if (resData['measure'] && Array.isArray(resData['measure'])) {
+ for (let i = 0; i < resData['measure'].length; i++) {
+ if (resData['measure'][i].id == 'influence') {
+ result.measure[1] = resData['measure'][i].class;
+ if (resData['measure'][i].class == 'A') {
+ result.measure[3] = 'Exceptional';
+ } else if (resData['measure'][i].class == 'B') {
+ result.measure[3] = 'Substantial';
+ } else {
+ result.measure[3] = 'Average';
+ }
+ }
+ if (resData['measure'][i].id == 'popularity') {
+ result.measure[0] = resData['measure'][i].class;
+ if (resData['measure'][i].class == 'A') {
+ result.measure[2] = 'Exceptional';
+ } else if (resData['measure'][i].class == 'B') {
+ result.measure[2] = 'Substantial';
+ } else {
+ result.measure[2] = 'Average';
+ }
+ }
+ }
+ }
/////////////////////////// Athena Code ///////////////////////////
if (resData['pid']) {
if (!Array.isArray(resData['pid'])) {
@@ -370,7 +396,6 @@ export class SearchResearchResultsService {
}
results.push(result);
}
-
return results;
}
diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts
index b9df9bb2..35560870 100644
--- a/sharedComponents/input/input.component.ts
+++ b/sharedComponents/input/input.component.ts
@@ -59,7 +59,7 @@ declare var UIkit;
+ [attr.uk-tooltip]="(tooltip && formControl.value && !focused && type !== 'chips' && type !== 'textarea')?('title: ' + getTooltip(formControl.value) + '; delay: 500; pos: bottom-left'):null">
@@ -497,6 +497,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value));
return (option) ? option.label : (value);
}
+
+ getTooltip(value: any): string {
+ let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value));
+ return (option) ? (option.tooltip ? option.tooltip : option.label) : (value);
+ }
focus(value: boolean, event = null) {
if (this.focused) {
diff --git a/utils/entities/searchResult.ts b/utils/entities/searchResult.ts
index d88b6731..490a5c9f 100644
--- a/utils/entities/searchResult.ts
+++ b/utils/entities/searchResult.ts
@@ -6,6 +6,7 @@ export class SearchResult {
relcanId: string;
DOIs: string[]=[];
identifiers: Map;
+ measure: Array;
//publications & datasets & orp & software & projects & dataproviders:
description: string;
diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html
index 81087974..b683ad2e 100644
--- a/utils/result-preview/result-preview.component.html
+++ b/utils/result-preview/result-preview.component.html
@@ -309,29 +309,29 @@
- 0 && isResultType) || result.orcidCreationDates?.length > 0))"
class="uk-text-small"
[ngClass]="{'uk-card-footer': isCard}">
-
+
-
+
- {{" " + result.pop_inf[2] + " popularity" }}
+ {{" " + result.measure[2] + " popularity" }}
-
+
- {{" " + result.pop_inf[2] + " popularity" }}
+ {{" " + result.measure[2] + " popularity" }}
- {{" " + (result.pop_inf[0] == 'A' ? 'In top 0.01%' : '') + (result.pop_inf[0] == 'B' ? 'In top 1%' : '') + (result.pop_inf[0] == 'C' ? 'In bottom 99%' : '')}}
+ {{" " + (result.measure[0] == 'A' ? 'In top 0.01%' : '') + (result.measure[0] == 'B' ? 'In top 1%' : '') + (result.measure[0] == 'C' ? 'In bottom 99%' : '')}}
Popularity: Citation-based measure reflecting the current impact.
-
+
- {{" " + result.pop_inf[3] + " influence" }}
+ {{" " + result.measure[3] + " influence" }}
-
+
- {{result.pop_inf[3] + " influence" }}
+ {{result.measure[3] + " influence" }}
- {{" " + (result.pop_inf[1] == 'A' ? 'In top 0.01%' : '') + (result.pop_inf[1] == 'B' ? 'In top 1%' : '') + (result.pop_inf[1] == 'C' ? 'In bottom 99%' : '')}}
+ {{" " + (result.measure[1] == 'A' ? 'In top 0.01%' : '') + (result.measure[1] == 'B' ? 'In top 1%' : '') + (result.measure[1] == 'C' ? 'In bottom 99%' : '')}}
Influence: Citation-based measure reflecting the total impact.
diff --git a/utils/result-preview/result-preview.component.less b/utils/result-preview/result-preview.component.less
new file mode 100644
index 00000000..93da8f46
--- /dev/null
+++ b/utils/result-preview/result-preview.component.less
@@ -0,0 +1,10 @@
+// Impact Factors
+.popularity-A svg .a, .influence-A svg .a {
+ fill:#d51717;
+}
+.popularity-B svg .a, .influence-B svg .a {
+ fill: #e1920a;
+}
+.popularity-C svg .a, .influence-C svg .a {
+ fill: #444;
+}
\ No newline at end of file
diff --git a/utils/result-preview/result-preview.component.ts b/utils/result-preview/result-preview.component.ts
index a5663358..121c4bd7 100644
--- a/utils/result-preview/result-preview.component.ts
+++ b/utils/result-preview/result-preview.component.ts
@@ -10,7 +10,8 @@ import {OpenaireEntities} from "../properties/searchFields";
@Component({
selector: 'result-preview',
- templateUrl: 'result-preview.component.html'
+ templateUrl: 'result-preview.component.html',
+ styleUrls: ['result-preview.component.less']
})
export class ResultPreviewComponent implements OnInit, OnChanges {
@Input() result: ResultPreview;
diff --git a/utils/result-preview/result-preview.ts b/utils/result-preview/result-preview.ts
index 73211623..e2c79a92 100644
--- a/utils/result-preview/result-preview.ts
+++ b/utils/result-preview/result-preview.ts
@@ -81,7 +81,8 @@ export class ResultPreview {
//Impact factor
DOI:string;
- pop_inf;
+ measure: Array;
+
//publications & datasets & orp & software & organizations:
projects: Project[];
@@ -194,6 +195,7 @@ export class ResultPreview {
// }
resultPreview.identifiers = result.identifiers;
resultPreview.enermapsId = result.enermapsId;
+ resultPreview.measure = result.measure;
return resultPreview;
}
diff --git a/utils/tabs/contents/search-tab.component.ts b/utils/tabs/contents/search-tab.component.ts
index 96e02b31..daa12d88 100644
--- a/utils/tabs/contents/search-tab.component.ts
+++ b/utils/tabs/contents/search-tab.component.ts
@@ -39,7 +39,7 @@ import {StringUtils} from "../../string-utils.class";
+ [type]="resultType" [showEnermaps]="showEnermaps">
@@ -59,7 +59,6 @@ export class SearchTabComponent {
@Input() public searchNumber: number = 5;
@Input() public searchLinkToAdvancedPage: string;
@Input() properties: EnvProperties;
- @Input() showImpactFactors;
@Input() customTitle;
@Input() showEnermaps: boolean;
@Input() currentPage: number = null;