From 9ead7fee7d73a274e96096cdfe18afe4644fe085 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 20 Dec 2022 15:27:18 +0200 Subject: [PATCH 01/95] progress on explore landing page --- .../landing-header.component.ts | 28 +++---- .../result/resultLanding.component.html | 79 ++++++++++++++----- 2 files changed, 74 insertions(+), 33 deletions(-) diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index 39ebfbed..d8286945 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -7,14 +7,20 @@ import {AlertModal} from "../../../utils/modal/alert"; selector: 'landing-header', template: `
-
- +
+ +
+ +
+
+
+ {{entityType}} - - {{(entityType?' . ':'') + removeUnknown(types, true).join(' . ')}} - - + + {{(entityType?' >> ':'') + removeUnknown(types, true).join(' . ')}} + + {{' . '}} @@ -41,20 +47,14 @@ import {AlertModal} from "../../../utils/modal/alert"; {{' . ' + year}} - . Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} + . Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} . Under curation -
-
- -
- -
-
+
diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index bedbea13..2cf40c10 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -4,7 +4,7 @@
-
+
  • -
  • @@ -42,7 +40,6 @@
  • -
  • -
  • -
    + -->
    @@ -106,6 +102,45 @@
    + +
    + +
    +
    @@ -166,12 +201,6 @@ - - - - View all {{resultLandingInfo.deletedByInferenceIds.length}} versions - -
    - -
    - - {{(resultLandingInfo.countries.length === 1) ? 'Country: ' : 'Countries: '}} - - {{resultLandingInfo.countries.join(", ")}} -
    @@ -282,6 +304,14 @@ +
    +
    + {{(resultLandingInfo.countries.length === 1) ? 'Country ' : 'Countries '}} +
    +
    + {{resultLandingInfo.countries.join(", ")}} +
    +
    + +
    +
    +
    + left +
    +
    + right +
    +
    +
    + [types]="dataProviderInfo.type ? [dataProviderInfo.type] : null" + [entityType]="getTypeName()"> diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 48536226..071bd84e 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -5,7 +5,19 @@ import {properties} from "../../../../environments/environment"; @Component({ selector: 'availableOn', template: ` -
    + + + + + + + {{availableOn[0].downloadNames.join("; ")}} + + + + + + + @@ -91,7 +105,9 @@ export class AvailableOnComponent { constructor() { } - ngOnInit() {} + ngOnInit() { + console.log(this.availableOn); + } public removeUnknown(value: string): string { if (value.toLowerCase() === 'unknown') { diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index d8286945..d68d6d12 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -6,19 +6,31 @@ import {AlertModal} from "../../../utils/modal/alert"; @Component({ selector: 'landing-header', template: ` -
    -
    +
    +
    -
    +
    + + + + + + + + + {{entityType}} + + + - {{(entityType?' >> ':'') + removeUnknown(types, true).join(' . ')}} + {{removeUnknown(types, true).join(' , ')}} @@ -54,6 +66,23 @@ import {AlertModal} from "../../../utils/modal/alert"; uk-tooltip="pos:bottom-right; delay:10;" class="uk-text-primary">Under curation + + + + + {{language}} + + + + + + + {{programmingLanguage}} + + + +
    @@ -79,6 +108,12 @@ export class LandingHeaderComponent { @Input() titleClass: string = null; @Input() isTitleH1:boolean =true; @Input() isSticky: boolean = false; + @Input() publisher; // showPublisher component + @Input() publishDate: Date; // showPublisher component + @Input() journal; // showPublisher component + @Input() languages; + @Input() programmingLanguages; + public removeUnknown(array: string[], type: boolean = false): string[] { if (type) { return this.removeDuplicates(array).filter(value => value.toLowerCase() !== 'unknown'); diff --git a/landingPages/landing-utils/landing-header/landing-header.module.ts b/landingPages/landing-utils/landing-header/landing-header.module.ts index d607e391..069a17b5 100644 --- a/landingPages/landing-utils/landing-header/landing-header.module.ts +++ b/landingPages/landing-utils/landing-header/landing-header.module.ts @@ -3,9 +3,11 @@ import {LandingHeaderComponent} from "./landing-header.component"; import {CommonModule} from "@angular/common"; import {LandingModule} from "../landing.module"; import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module"; +import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module"; +import {ShowPublisherModule} from "../showPublisher.module"; @NgModule({ - imports: [CommonModule, LandingModule, ShowAuthorsModule], + imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule], declarations: [LandingHeaderComponent], exports: [LandingHeaderComponent] }) diff --git a/landingPages/landing-utils/showPublisher.component.ts b/landingPages/landing-utils/showPublisher.component.ts index 55d96ffe..08e86591 100644 --- a/landingPages/landing-utils/showPublisher.component.ts +++ b/landingPages/landing-utils/showPublisher.component.ts @@ -4,73 +4,76 @@ import {EnvProperties} from "../../utils/properties/env-properties"; @Component({ selector: 'showPublisher, [showPublisher]', template: ` -
    - - Published: - {{publishDate | date: 'dd MMM yyyy' : 'UTC'}} - - - Journal: - {{journal['journal']}} - , - - - volume - {{journal['volume'] | number}} - {{journal['volume']}} - - , - - - - issue - {{journal['issue'] | number}} - {{journal['issue']}} - - , - - - {{(journal['start_page'] && journal['end_page']) ? 'pages' : 'page'}} - - {{journal['start_page'] | number}} - {{journal['start_page']}} - - - - - {{journal['end_page'] | number}} - {{journal['end_page']}} - - - ( - - issn: {{journal['issn']}} - , - - - eissn: {{journal['eissn']}} - , - - - lissn: {{journal['lissn']}} - , - - - - - Copyright policy - - - ) - -
    -
    - Publisher: {{publisher}} -
    + + + + {{publishDate | date: 'dd MMM yyyy' : 'UTC'}} + + + + + {{journal['journal']}} + , + + + volume + {{journal['volume'] | number}} + {{journal['volume']}} + + , + + + + issue + {{journal['issue'] | number}} + {{journal['issue']}} + + , + + + {{(journal['start_page'] && journal['end_page']) ? 'pages' : 'page'}} + + {{journal['start_page'] | number}} + {{journal['start_page']}} + + - + + {{journal['end_page'] | number}} + {{journal['end_page']}} + + + ( + + issn: {{journal['issn']}} + , + + + eissn: {{journal['eissn']}} + , + + + lissn: {{journal['lissn']}} + , + + + + + Copyright policy + + + ) + + + + + + {{publisher}} + ` }) export class ShowPublisherComponent { diff --git a/landingPages/landing-utils/showPublisher.module.ts b/landingPages/landing-utils/showPublisher.module.ts index 3da1cc5c..8a8d0549 100644 --- a/landingPages/landing-utils/showPublisher.module.ts +++ b/landingPages/landing-utils/showPublisher.module.ts @@ -1,10 +1,11 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {ShowPublisherComponent} from "./showPublisher.component"; +import {IconsModule} from '../../utils/icons/icons.module'; @NgModule({ imports: [ - CommonModule + CommonModule, IconsModule ], declarations: [ ShowPublisherComponent diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 2cf40c10..f0d0e01d 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -105,36 +105,58 @@
    -
    + @@ -206,10 +228,14 @@ [authors]="resultLandingInfo.authors" [underCuration]="resultLandingInfo.underCurationMessage" [entityType]="getTypeName()" [types]="resultLandingInfo.types" - [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"> + [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [publisher]="resultLandingInfo.publisher" [publishDate]="resultLandingInfo.dateofacceptance" + [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" + [programmingLanguages]="resultLandingInfo.programmingLanguages"> -
    + +
    -
    +
    @@ -522,9 +549,9 @@ (viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true">
    -
    +
    diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 3a901b22..3f091caa 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -33,7 +33,7 @@ import {MatFormFieldModule} from "@angular/material/form-field"; import {MatSelectModule} from "@angular/material/select"; import {IconsModule} from "../../utils/icons/icons.module"; import {IconsService} from "../../utils/icons/icons.service"; -import {graph, link, quotes} from "../../utils/icons/icons"; +import {graph, link, quotes, cite, link_to, versions} from "../../utils/icons/icons"; import {InputModule} from "../../sharedComponents/input/input.module"; import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; @@ -58,6 +58,6 @@ import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.modul }) export class ResultLandingModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([link, graph, quotes]) + this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions]) } } diff --git a/orcid/orcid-work.component.ts b/orcid/orcid-work.component.ts index 3f0ccc69..a91d319e 100644 --- a/orcid/orcid-work.component.ts +++ b/orcid/orcid-work.component.ts @@ -54,21 +54,22 @@ declare var UIkit: any; - + + Claim ' } + +export const cite = { + name: 'cite', + data: ' ' +} + +export const link_to = { + name: 'link_to', + data: ' ' +} + +export const versions = { + name: 'versions', + data: ' ' +} /** Add new icon under this line to be sure that it will be added on preview */ From c1fa0889ee670084ba97f6a22e67a2d23c09d95c Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 13 Jan 2023 08:32:16 +0200 Subject: [PATCH 03/95] progress in landing page (new metrics, tweaks for new action-bar) --- .../landing-utils/availableOn.component.ts | 53 ++++- .../result/resultLanding.component.html | 211 ++++++++++++++++-- landingPages/result/resultLanding.service.ts | 78 ++++++- orcid/orcid-work.component.ts | 42 ++-- utils/entities/resultLandingInfo.ts | 11 + 5 files changed, 356 insertions(+), 39 deletions(-) diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 071bd84e..916b55b2 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -1,20 +1,57 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; +import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core'; import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview"; import {properties} from "../../../../environments/environment"; +declare var UIkit; @Component({ selector: 'availableOn', template: ` - - + - {{availableOn[0].downloadNames.join("; ")}} + {{availableOn[0].downloadNames.join("; ")}} + - + +
    +
    + + + +
    + + + {{instance.downloadNames.join("; ")}} + + +
    + {{instance.types.join(" . ")}} + . + {{instance.years.join(" . ")}} +
    +
    + License: + + {{instance.license}} + + {{instance.license}} +
    +
    + Providers: + + {{collectedName}}; + +
    +
    +
    +
    - + @@ -130,28 +128,20 @@ Link to Share Cite - - - + - + + + +
    @@ -459,6 +453,160 @@
    + +
    + +
      +
    • +
      +
      +
      +
      +
      + BIP! +
      + Impact by + BIP! +
      +
      + + + + + + + + + + + + + + + + + + + +
      + Citations + + {{resultLandingInfo.measure.citations}} +
      + Popularity + + {{resultLandingInfo.measure.popularity}} +
      + Influence + + {{resultLandingInfo.measure.influence}} +
      + Impulse + + {{resultLandingInfo.measure.impulse}} +
      +
      +
      +
      +
      +
      +
      +
      + Altmetric +
      + Social by + Altmetric +
      +
      + + + + + + + + + + + +
      + Facebook + + 1 +
      + Twitter + + 4 +
      +
      +
      +
      +
      +
      +
      +
      + usage counts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{resultLandingInfo.measure.downloads}} +
      + + + Views + + {{resultLandingInfo.measure.views}} +
      +
      +
      +
      +
      +
    • +
    • + 2 +
    • +
    • + 3 +
    • +
    • + 4 +
    • +
    +
    +
    @@ -504,13 +652,40 @@ -
    +
    -
    - left +
    +
    + +
    +
    Citations
    +
    Popularity
    +
    Influence
    +
    Downloads
    +
    Views
    +
    +
    +
    {{resultLandingInfo.measure.citations}}
    +
    {{resultLandingInfo.measure.popularity}}
    +
    {{resultLandingInfo.measure.influence}}
    +
    {{resultLandingInfo.measure.downloads}}
    +
    {{resultLandingInfo.measure.views}}
    +
    +
    -
    - right +
    +
    diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index f240ebeb..26c2ff25 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -126,7 +126,7 @@ export class ResultLandingService { } parseResultLandingInfo (data: any, subjectsVocabulary: any, properties: EnvProperties): any { - this.resultLandingInfo = new ResultLandingInfo(); + this.resultLandingInfo = new ResultLandingInfo(); // res this.resultLandingInfo.record = data[15]; @@ -408,6 +408,82 @@ export class ResultLandingService { }); } + // res['result']['metadata']['oaf:entity']['oaf:result']['measure'] + if (data[0] != null) { + if (data[0].measure?.length) { + this.resultLandingInfo.measure = {"downloads": null, "views": null, "popularity": null, "influence": null, "citations": null, "impulse": null}; + for (let i = 0; i < data[0].measure.length; i++) { + if (data[0].measure[i].id == 'downloads') { + // this.resultLandingInfo.measure['downloads'] = data[0].measure[i].count; + this.resultLandingInfo.measure['downloads'] = data[0].measure[i].count == 0 ? ' - ' : data[0].measure[i].count; + } + if (data[0].measure[i].id == 'views') { + this.resultLandingInfo.measure['views'] = data[0].measure[i].count == 0 ? ' - ' : data[0].measure[i].count; + } + if (data[0].measure[i].id == 'influence') { + if (data[0].measure[i].class == 'C1') { + this.resultLandingInfo.measure['influence'] = 'Top 0.01%'; + } else if (data[0].measure[i].class == 'C2') { + this.resultLandingInfo.measure['influence'] = 'Top 0.1%'; + } else if (data[0].measure[i].class == 'C3') { + this.resultLandingInfo.measure['influence'] = 'Top 1%'; + } else if (data[0].measure[i].class == 'C4') { + this.resultLandingInfo.measure['influence'] = 'Top 10%'; + } else if (data[0].measure[i].class == 'C5') { + this.resultLandingInfo.measure['influence'] = 'Average/low'; + } else if (data[0].measure[i].class == 'A') { + this.resultLandingInfo.measure['influence'] = 'Exceptional'; + } else if (data[0].measure[i].class == 'B') { + this.resultLandingInfo.measure['influence'] = 'Substantial'; + } else { + this.resultLandingInfo.measure['influence'] = 'Average'; + } + } + if (data[0].measure[i].id == 'popularity') { + if (data[0].measure[i].class == 'C1') { + this.resultLandingInfo.measure['popularity'] = 'Top 0.01%'; + } else if (data[0].measure[i].class == 'C2') { + this.resultLandingInfo.measure['popularity'] = 'Top 0.1%'; + } else if (data[0].measure[i].class == 'C3') { + this.resultLandingInfo.measure['popularity'] = 'Top 1%'; + } else if (data[0].measure[i].class == 'C4') { + this.resultLandingInfo.measure['popularity'] = 'Top 10%'; + } else if (data[0].measure[i].class == 'C5') { + this.resultLandingInfo.measure['popularity'] = 'Average/low'; + } else if (data[0].measure[i].class == 'A') { + this.resultLandingInfo.measure['popularity'] = 'Exceptional'; + } else if (data[0].measure[i].class == 'B') { + this.resultLandingInfo.measure['popularity'] = 'Substantial'; + } else { + this.resultLandingInfo.measure['popularity'] = 'Average'; + } + } + if (data[0].measure[i].id == 'influence_alt') { + this.resultLandingInfo.measure['citations'] = data[0].measure[i].score == 0 ? ' - ' : data[0].measure[i].score; + } + if (data[0].measure[i].id == 'impulse') { + if (data[0].measure[i].class == 'C1') { + this.resultLandingInfo.measure['impulse'] = 'Top 0.01%'; + } else if (data[0].measure[i].class == 'C2') { + this.resultLandingInfo.measure['impulse'] = 'Top 0.1%'; + } else if (data[0].measure[i].class == 'C3') { + this.resultLandingInfo.measure['impulse'] = 'Top 1%'; + } else if (data[0].measure[i].class == 'C4') { + this.resultLandingInfo.measure['impulse'] = 'Top 10%'; + } else if (data[0].measure[i].class == 'C5') { + this.resultLandingInfo.measure['impulse'] = 'Average/low'; + } else if (data[0].measure[i].class == 'A') { + this.resultLandingInfo.measure['impulse'] = 'Exceptional'; + } else if (data[0].measure[i].class == 'B') { + this.resultLandingInfo.measure['impulse'] = 'Substantial'; + } else { + this.resultLandingInfo.measure['impulse'] = 'Average'; + } + } + } + } + } + this.resultLandingInfo.relatedResults = this.parsingFunctions.sortByPercentage(this.resultLandingInfo.relatedResults); return this.resultLandingInfo; diff --git a/orcid/orcid-work.component.ts b/orcid/orcid-work.component.ts index a91d319e..5f95479d 100644 --- a/orcid/orcid-work.component.ts +++ b/orcid/orcid-work.component.ts @@ -54,33 +54,47 @@ declare var UIkit: any; + [attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'" + [title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"> - - + class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder landing-action-button-orcid" + [class.uk-disabled]="showLoading || !isLoggedIn || !pids" + (mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)"> + Claim - + + class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder landing-action-button-orcid" + [class.uk-disabled]="showLoading || !isLoggedIn || !pids" + (mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')"> + + Remove + + + + + + diff --git a/utils/entities/resultLandingInfo.ts b/utils/entities/resultLandingInfo.ts index c531307d..5ed2b93b 100644 --- a/utils/entities/resultLandingInfo.ts +++ b/utils/entities/resultLandingInfo.ts @@ -29,6 +29,15 @@ export interface Context { logo?: string; } +export interface Measure { + downloads: string; + views: string; + influence: string; + popularity: string; + citations: string; + impulse: string; +} + export class ResultLandingInfo { relcanId; objIdentifier: string; @@ -140,4 +149,6 @@ export class ResultLandingInfo { // SOFTWARE programmingLanguages: string[]; + + measure: Measure; } From 95de86e7673b07b3f0d2c0afe3051ecc1ebc72dd Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 13 Jan 2023 15:57:26 +0200 Subject: [PATCH 04/95] progress in result landing page --- .../landing-utils/availableOn.component.ts | 89 +++++---- landingPages/landing-utils/fos.component.ts | 4 +- .../landing-utils/fundedBy.component.ts | 2 +- .../landing-utils/relatedTo.component.ts | 2 +- landingPages/landing-utils/sdg.component.ts | 4 +- .../result/resultLanding.component.html | 181 +++++++++++++----- .../result/resultLanding.component.ts | 6 +- landingPages/result/resultLanding.module.ts | 4 +- .../dataTransfer/transferData.component.html | 15 +- utils/dataTransfer/transferData.module.ts | 8 +- utils/icons/icons.ts | 15 ++ 11 files changed, 219 insertions(+), 111 deletions(-) diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 916b55b2..d18b7688 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -1,53 +1,60 @@ import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core'; import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview"; import {properties} from "../../../../environments/environment"; +import {StringUtils} from '../../utils/string-utils.class'; declare var UIkit; @Component({ selector: 'availableOn', template: ` - - - - - {{availableOn[0].downloadNames.join("; ")}} - - - -
    -
    - - +
    + + + -
    - - - {{instance.downloadNames.join("; ")}} - + {{sliceString(availableOn[0].downloadNames.join("; "), 20)}} + + + + + + +
    +
    + + -
    - {{instance.types.join(" . ")}} - . - {{instance.years.join(" . ")}} -
    -
    - License: - - {{instance.license}} - - {{instance.license}} -
    -
    - Providers: - - {{collectedName}}; - +
    + + + {{instance.downloadNames.join("; ")}} + + +
    + {{instance.types.join(" . ")}} + . + {{instance.years.join(" . ")}} +
    +
    + License: + + {{instance.license}} + + {{instance.license}} +
    +
    + Providers: + + {{collectedName}}; + +
    @@ -179,4 +186,8 @@ export class AvailableOnComponent { get isOpen() { return (typeof document !== 'undefined') && this.dropElement && UIkit.drop(this.dropElement.nativeElement).isActive(); } + + public sliceString(str: string, size: number) { + return StringUtils.sliceString(str, size) + } } diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index c1ffc00a..7bdbc318 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -12,11 +12,11 @@ import {StringUtils} from "../../utils/string-utils.class"; {{title}} - {{title}} + {{title}} - View all & feedback + View all & suggest Feedback diff --git a/landingPages/landing-utils/fundedBy.component.ts b/landingPages/landing-utils/fundedBy.component.ts index 634998e1..2d82a151 100644 --- a/landingPages/landing-utils/fundedBy.component.ts +++ b/landingPages/landing-utils/fundedBy.component.ts @@ -11,7 +11,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class'; {{title}} - {{title}} + {{title}} View less View all diff --git a/landingPages/landing-utils/relatedTo.component.ts b/landingPages/landing-utils/relatedTo.component.ts index b9c64222..61929ab4 100644 --- a/landingPages/landing-utils/relatedTo.component.ts +++ b/landingPages/landing-utils/relatedTo.component.ts @@ -18,7 +18,7 @@ import {OpenaireEntities} from "../../utils/properties/searchFields"; {{title}} - {{title}} + {{title}} View less View all diff --git a/landingPages/landing-utils/sdg.component.ts b/landingPages/landing-utils/sdg.component.ts index c8ba6336..01ff2d60 100644 --- a/landingPages/landing-utils/sdg.component.ts +++ b/landingPages/landing-utils/sdg.component.ts @@ -13,11 +13,11 @@ import {StringUtils} from "../../utils/string-utils.class"; {{title}} - {{title}} + {{title}} - View all & feedback + View all & suggest Feedback
    diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index cf180b37..e91edbdf 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -108,9 +108,9 @@
    @@ -294,7 +293,7 @@ customClass="portalTab"> - @@ -453,26 +452,27 @@
    - +
    -
      + -
        +
          +
        • -
          -
          +
          +
          @@ -485,6 +485,9 @@ + @@ -493,6 +496,9 @@ + @@ -501,6 +507,9 @@ + @@ -509,6 +518,9 @@ + @@ -522,7 +534,7 @@
          -
          +
          Altmetric @@ -554,11 +566,11 @@
          -
          -
          +
          +
          - usage counts + OpenAIRE UsageCounts
          Usage by UsageCounts @@ -595,14 +607,87 @@
          -
        • - 2 + +
        • +
          +
          +
        • + + Citations
          + + Popularity
          + + Influence
          + + Impulse
          + + + + + + + + + + + + + + + + + + + + + + +
          + + + Citations + + {{resultLandingInfo.measure.citations}} +
          + + + Popularity + + {{resultLandingInfo.measure.popularity}} +
          + + + Influence + + {{resultLandingInfo.measure.influence}} +
          + + + Impulse + + {{resultLandingInfo.measure.impulse}} +
          +
          +
          + Chart +
          +
          +
          + Powered by + BIP! + BIP! +
        • +
        • 3
        • -
        • - 4 + +
        • +
          +
          + Stats +
          +
          + Chart +
          +
          +
          + Powered by + OpenAIRE UsageCounts +
    @@ -652,40 +737,36 @@ -
    -
    +
    -
    - +
    -
    Citations
    -
    Popularity
    -
    Influence
    -
    Downloads
    -
    Views
    +
    +
    +
    +
    +
    +
    +
    +
    Citations
    +
    Popularity
    +
    Influence
    +
    Downloads
    +
    Views
    -
    {{resultLandingInfo.measure.citations}}
    -
    {{resultLandingInfo.measure.popularity}}
    -
    {{resultLandingInfo.measure.influence}}
    -
    {{resultLandingInfo.measure.downloads}}
    -
    {{resultLandingInfo.measure.views}}
    +
    {{resultLandingInfo.measure.citations}}
    +
    {{resultLandingInfo.measure.popularity}}
    +
    {{resultLandingInfo.measure.influence}}
    +
    {{resultLandingInfo.measure.downloads}}
    +
    {{resultLandingInfo.measure.views}}
    -
    - +
    + Metrics badge
    @@ -721,7 +802,7 @@
    + (viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true">
    diff --git a/utils/dataTransfer/transferData.module.ts b/utils/dataTransfer/transferData.module.ts index d78dd6d2..a8b6a44d 100644 --- a/utils/dataTransfer/transferData.module.ts +++ b/utils/dataTransfer/transferData.module.ts @@ -4,18 +4,18 @@ import {FormsModule} from '@angular/forms'; import {EGIDataTransferComponent} from "./transferData.component"; import {InputModule} from "../../sharedComponents/input/input.module"; import {AlertModalModule} from "../modal/alertModal.module"; +import {IconsModule} from '../icons/icons.module'; @NgModule({ imports: [ - CommonModule, FormsModule, InputModule, AlertModalModule - + CommonModule, FormsModule, InputModule, AlertModalModule, IconsModule ], declarations: [ EGIDataTransferComponent - ], + ], exports: [ EGIDataTransferComponent - ] + ] }) export class EGIDataTransferModule { } diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts index 0c020ffa..c8786e9a 100644 --- a/utils/icons/icons.ts +++ b/utils/icons/icons.ts @@ -127,4 +127,19 @@ export const versions = { name: 'versions', data: ' ' } + +export const rocket = { + name: 'rocket', + data: '' +} + +export const fire = { + name: 'fire', + data: '' +} + +export const landmark = { + name: 'landmark', + data: '' +} /** Add new icon under this line to be sure that it will be added on preview */ From c58bc15a74ca36f928939fc787ce8eeb21ec0707 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 23 Jan 2023 16:19:00 +0200 Subject: [PATCH 05/95] progress on all landing page types --- .../dataProvider/dataProvider.component.html | 34 +++-- .../landing-utils/availableOn.component.ts | 6 +- .../landing-header.component.ts | 127 +++++++++++++----- .../landing-utils/parsingFunctions.class.ts | 4 +- .../landing-utils/showPublisher.component.ts | 7 +- .../organization/organization.component.html | 43 +++++- .../organization/organization.module.ts | 4 +- landingPages/project/project.component.html | 71 +++++++--- landingPages/project/project.module.ts | 4 +- .../result/resultLanding.component.html | 72 ++++------ landingPages/result/resultLanding.module.ts | 4 +- landingPages/result/resultLanding.service.ts | 1 - utils/altmetrics.component.ts | 9 +- utils/icons/icons.ts | 10 ++ 14 files changed, 259 insertions(+), 137 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index aa6ec280..12902252 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -4,7 +4,7 @@
    -
    +
  • -
    +
    -->
    @@ -70,8 +69,22 @@
    -
    + +
    @@ -99,18 +112,21 @@ [subTitle]="(dataProviderInfo.officialName && dataProviderInfo.title.name !== dataProviderInfo.officialName)?dataProviderInfo.officialName:null" [types]="dataProviderInfo.type ? [dataProviderInfo.type] : null" - [entityType]="getTypeName()"> + [entityType]="getTypeName()" + [compatibility]="dataProviderInfo.compatibility" [aggregationStatus]="dataProviderInfo.aggregationStatus" + [thematic]="dataProviderInfo.thematic" [type]="type"> -
    + +
    - - + {{sliceString(availableOn[0].downloadNames.join("; "), 20)}} @@ -26,7 +26,7 @@ declare var UIkit;
    - +
    diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index d68d6d12..a7ddf8ba 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -2,6 +2,7 @@ import {Component, Input} from "@angular/core"; import {EnvProperties} from "../../../utils/properties/env-properties"; import {Author} from "../../../utils/result-preview/result-preview"; import {AlertModal} from "../../../utils/modal/alert"; +import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchFields"; @Component({ selector: 'landing-header', @@ -14,6 +15,23 @@ import {AlertModal} from "../../../utils/modal/alert";
    + + + + + + + Open Access Mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}} + + + Open Access Mandate for {{openaireEntities.PUBLICATIONS}} + + + Open Access Mandate for {{openaireEntities.DATASETS}} + + + + @@ -32,35 +50,41 @@ import {AlertModal} from "../../../utils/modal/alert"; {{removeUnknown(types, true).join(' , ')}} - - - {{' . '}} - - - {{'from '}} - - - {{'until '}} - - - {{startDate | date: 'yyyy'}} - - - {{' - '}} - - - {{endDate | date: 'yyyy'}} - - - - {{' . ' + status}} - - - {{' . ' + year}} - - - . Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} - + + + + From + {{startDate | date: 'dd MMM yyyy'}} + + + + Until + {{endDate | date: 'dd MMM yyyy'}} + + + + + {{startDate | date: 'dd MMM yyyy'}} + (Started) + + - + + {{endDate | date: 'dd MMM yyyy'}} + {{currentDate >= endDate ? '(Ended)' : '(Ending)'}} + + + + + {{status}} + + + + {{date | date: 'dd MMM yyyy': 'UTC'}} + + + + Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} + . - + + + + + + + + {{compatibility.info}} + {{compatibility.name}} + + + {{compatibility.info}} + + {{compatibility.info}} in OpenAIRE + + + + {{compatibility.name}} + + + + + + OpenAIRE Text Mining + + + + Thematic +
    @@ -95,8 +148,11 @@ export class LandingHeaderComponent { @Input() types: string[]; @Input() startDate: number; // project landing @Input() endDate: number; // project landing + @Input() currentDate: number; // project landing @Input() status: string; // project landing - @Input() year: string; + @Input() openAccessMandatePublications: boolean // project landing + @Input() openAccessMandateDatasets: boolean // project landing + @Input() date: Date; @Input() embargoEndDate: Date; @Input() title: string; @Input() subTitle: string; @@ -109,10 +165,15 @@ export class LandingHeaderComponent { @Input() isTitleH1:boolean =true; @Input() isSticky: boolean = false; @Input() publisher; // showPublisher component - @Input() publishDate: Date; // showPublisher component @Input() journal; // showPublisher component @Input() languages; @Input() programmingLanguages; + @Input() compatibility; // data provider landing + @Input() aggregationStatus; // data provider landing + @Input() thematic: boolean; // data provider landing + @Input() type; // data provider landing + + public openaireEntities = OpenaireEntities; public removeUnknown(array: string[], type: boolean = false): string[] { if (type) { diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 23592e3f..0111e941 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -20,8 +20,8 @@ export class ParsingFunctions { private notebook_label: string = "EOSC"; private notebook_value: string = "EOSC Jupyter Notebook"; - public open = 'lock_open'; - public closed = 'lock'; + public open = 'open_access'; + public closed = 'closed_access'; public unknown = 'question_mark'; private instanceWithDoiExists: boolean = false; diff --git a/landingPages/landing-utils/showPublisher.component.ts b/landingPages/landing-utils/showPublisher.component.ts index 08e86591..5aaf623c 100644 --- a/landingPages/landing-utils/showPublisher.component.ts +++ b/landingPages/landing-utils/showPublisher.component.ts @@ -4,12 +4,8 @@ import {EnvProperties} from "../../utils/properties/env-properties"; @Component({ selector: 'showPublisher, [showPublisher]', template: ` - - - - {{publishDate | date: 'dd MMM yyyy' : 'UTC'}} - @@ -77,7 +73,6 @@ import {EnvProperties} from "../../utils/properties/env-properties"; ` }) export class ShowPublisherComponent { - @Input() publishDate: Date; @Input() publisher; @Input() journal; //@Input() sherpaUrl = 'http://www.sherpa.ac.uk/romeo/search.php?issn='; diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 95cdc3f7..0a1502fc 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -3,13 +3,12 @@
    -
    +
  • @@ -18,7 +17,6 @@
  • -
  • @@ -31,7 +29,8 @@
  • -
    +
    --> +
    @@ -63,11 +62,43 @@
    +
    + + +
    @@ -100,12 +131,12 @@ - + -
    +
  • -
  • @@ -57,7 +55,6 @@ -
  • -
    +
    -->
    @@ -109,6 +106,45 @@
    + + +
    @@ -171,12 +207,14 @@ + [startDate]="projectInfo.startDate" [endDate]="projectInfo.endDate" + [currentDate]="projectInfo.currentDate" [status]="projectInfo.status" + [openAccessMandatePublications]="projectInfo.openAccessMandatePublications" + [openAccessMandateDatasets]="projectInfo.openAccessMandateDatasets"> -
    + + - - - - -
    +
    -->
    @@ -245,13 +278,13 @@
    -
    + +
    {{projectInfo.urlInfo}} diff --git a/landingPages/project/project.module.ts b/landingPages/project/project.module.ts index 496a07af..5e4c6762 100644 --- a/landingPages/project/project.module.ts +++ b/landingPages/project/project.module.ts @@ -31,7 +31,7 @@ import {LoadingModule} from "../../utils/loading/loading.module"; import {IconsModule} from "../../utils/icons/icons.module"; import {InputModule} from "../../sharedComponents/input/input.module"; import {IconsService} from "../../utils/icons/icons.service"; -import {graph, link} from "../../utils/icons/icons"; +import {graph, link, link_to, open_access} from "../../utils/icons/icons"; @NgModule({ imports: [ @@ -55,6 +55,6 @@ import {graph, link} from "../../utils/icons/icons"; }) export class ProjectModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([link, graph]) + this.iconsService.registerIcons([link, graph, link_to, open_access]) } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index e91edbdf..b23d4e7b 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -217,10 +217,9 @@ [authors]="resultLandingInfo.authors" [underCuration]="resultLandingInfo.underCurationMessage" [entityType]="getTypeName()" [types]="resultLandingInfo.types" - [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" - [publisher]="resultLandingInfo.publisher" [publishDate]="resultLandingInfo.dateofacceptance" - [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" - [programmingLanguages]="resultLandingInfo.programmingLanguages"> + [date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal" + [languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"> @@ -271,7 +270,7 @@ [authors]="resultLandingInfo.authors" [underCuration]="resultLandingInfo.underCurationMessage" [entityType]="getTypeName()" [types]="resultLandingInfo.types" - [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate" isSticky="true"> @@ -292,8 +291,7 @@ [tabTitle]="'Enermaps Tool'" [tabId]="'enermaps'" customClass="portalTab"> - - @@ -452,7 +450,7 @@
    - +
    -
    -
    -
    -
    - Altmetric -
    - Social by - Altmetric -
    -
    - - - - - - - - - - - -
    - Facebook - - 1 -
    - Twitter - - 4 -
    -
    -
    +
    +
    @@ -671,8 +639,8 @@
    -
  • - 3 +
  • +
  • @@ -680,8 +648,16 @@
    Stats
    -
    - Chart +
    +
    + + +
    +
    + +
    @@ -747,21 +723,21 @@
    -
    +
    Citations
    Popularity
    Influence
    Downloads
    -
    Views
    +
    Views
    {{resultLandingInfo.measure.citations}}
    {{resultLandingInfo.measure.popularity}}
    {{resultLandingInfo.measure.influence}}
    {{resultLandingInfo.measure.downloads}}
    -
    {{resultLandingInfo.measure.views}}
    +
    {{resultLandingInfo.measure.views}}
  • diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 6620f0e6..32743312 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -33,7 +33,7 @@ import {MatFormFieldModule} from "@angular/material/form-field"; import {MatSelectModule} from "@angular/material/select"; import {IconsModule} from "../../utils/icons/icons.module"; import {IconsService} from "../../utils/icons/icons.service"; -import {graph, link, quotes, cite, link_to, versions, rocket, fire, landmark} from "../../utils/icons/icons"; +import {graph, link, quotes, cite, link_to, versions, rocket, fire, landmark, open_access, closed_access} from "../../utils/icons/icons"; import {InputModule} from "../../sharedComponents/input/input.module"; import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; @@ -58,6 +58,6 @@ import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.modul }) export class ResultLandingModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions, rocket, fire, landmark]) + this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions, rocket, fire, landmark, open_access, closed_access]) } } diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 26c2ff25..72212d64 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -127,7 +127,6 @@ export class ResultLandingService { parseResultLandingInfo (data: any, subjectsVocabulary: any, properties: EnvProperties): any { this.resultLandingInfo = new ResultLandingInfo(); - // res this.resultLandingInfo.record = data[15]; this.resultLandingInfo.objIdentifier = data[15]["result"]["header"]["dri:objIdentifier"]; diff --git a/utils/altmetrics.component.ts b/utils/altmetrics.component.ts index 71104099..ceab92dd 100644 --- a/utils/altmetrics.component.ts +++ b/utils/altmetrics.component.ts @@ -6,12 +6,13 @@ declare var loadAltmetrics:any; @Component({ selector: 'altmetrics', template: ` -
    +
    ` }) export class AltMetricsComponent { - @Input() id ; + @Input() id; @Input() type = 'doi'; // doi or arxiv + @Input() size: string = 'donut'; // public doi="10.7717/peerj.1150"; public altmetrics:string; @@ -26,9 +27,9 @@ export class AltMetricsComponent { ngOnInit() { this.sub = this.route.queryParams.subscribe(data => { if(this.type == "doi"){ - this.altmetrics='
    '; + this.altmetrics='
    '; }else{ - this.altmetrics='
    '; + this.altmetrics='
    '; } if (typeof document !== 'undefined') { // let yourModule = require('../utils/altmetrics.js'); diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts index c8786e9a..686cabfa 100644 --- a/utils/icons/icons.ts +++ b/utils/icons/icons.ts @@ -142,4 +142,14 @@ export const landmark = { name: 'landmark', data: '' } + +export const open_access = { + name: 'open_access', + data: ' image/svg+xml art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos Open Access logo, converted into svg, designed by PLoS. This version with transparent background. http://commons.wikimedia.org/wiki/File:Open_Access_logo_PLoS_white.svg art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos http://www.plos.org/ ' +} + +export const closed_access = { + name: 'closed_access', + data: ' image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao ' +} /** Add new icon under this line to be sure that it will be added on preview */ From 0a519c667a6286a0bedb528ef4741c53ba5c3532 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 24 Jan 2023 15:32:58 +0200 Subject: [PATCH 06/95] start on result landing mobile redesign --- .../dataProvider/dataProvider.component.html | 851 +++++++++--------- landingPages/landing-utils/fos.component.ts | 65 +- .../landing-header.component.ts | 6 +- landingPages/landing-utils/sdg.component.ts | 74 +- .../result/resultLanding.component.html | 196 +++- 5 files changed, 676 insertions(+), 516 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 12902252..3ad5742f 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -6,13 +6,13 @@
    -
    - -
    - -
    -
    - - -
    - -
    - - - Powered by - OpenAIRE Research Graph - - - . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} - -
    - -
    - See an issue? - Report it here -
    -
    -
    - -
    - -
    - -
    -
    -
    - + +
    +
    + +
    +
    -
    - -
    - -
    - - - -
    -
    + + +
    + +
    + + + Powered by + OpenAIRE Research Graph + + + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} + +
    + +
    + See an issue? + Report it here +
    +
    +
    + +
    + +
    + +
    + - -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Description
    -
    -
    -
    - +
    + +
    + +
    + + + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    + No summary information available +
    +
    +
    + +
    +
    +
    Description
    +
    +
    +
    + +
    +
    + +
      + +
    + +
    + +
    Collected full-texts
    + {{dataProviderInfo.aggregationStatus.fulltexts | number}} +
    + +
    Results with funding information
    + {{dataProviderInfo.fundedContent | number}} +
    +
    + + +
    +
    Countries
    + {{dataProviderInfo.countries.join(", ")}} +
    + +
    +
    Jurisdiction
    + {{dataProviderInfo.jurisdiction}} +
    + +
    +
    Content policy
    + {{dataProviderInfo.contentpolicy}} +
    + + +
    +
    +
    Subjects
    + {{dataProviderInfo.subjects.slice(0, lessBtnSubjects ? dataProviderInfo.subjects.length : thresholdSubjects).join(", ")}} + ... +
    + -
    -
    - -
      - -
    - -
    - -
    Collected full-texts
    - {{dataProviderInfo.aggregationStatus.fulltexts | number}} -
    - -
    Results with funding information
    - {{dataProviderInfo.fundedContent | number}} -
    -
    - - -
    -
    Countries
    - {{dataProviderInfo.countries.join(", ")}} -
    - -
    -
    Jurisdiction
    - {{dataProviderInfo.jurisdiction}} -
    - -
    -
    Content policy
    - {{dataProviderInfo.contentpolicy}} -
    - - -
    -
    -
    Subjects
    - {{dataProviderInfo.subjects.slice(0, lessBtnSubjects ? dataProviderInfo.subjects.length : thresholdSubjects).join(", ")}} - ... -
    - - -
    - -
    -
    -
    -
    - -
    -
    Detailed information @
    - - - {{provenance}} - - - {{provenance}} - - [{{i}}] - - - , - -
    -
    - -
    -
    -
    -
    - - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - - -
    -
    Statistics
    - -
    - - -
    -
    -
    -
    -
    - - -
    + +
    + +
    +
    +
    +
    + +
    +
    Detailed information @
    + + + {{provenance}} + + + {{provenance}} + + [{{i}}] + + + , + +
    +
    + +
    +
    +
    +
    + + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + + +
    +
    Statistics
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    @@ -487,8 +490,8 @@ [attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'" [title]="organization.name"> + [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" + [routerLink]="properties.searchLinkToOrganization.split('?')[0]"> {{(organization.acronym) ? organization.acronym : ''}} {{(!organization.acronym && organization.name) ? organization.name : ''}} diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index 7bdbc318..0e893ba0 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -6,29 +6,46 @@ import {StringUtils} from "../../utils/string-utils.class"; @Component({ selector: 'fos', template: ` -
    Beta
    -
    - - - {{title}} - - {{title}} - - - View all & suggest - - Feedback -
    - +
    +
    Beta
    +
    + + + {{title}} + + {{title}} + + + View all & suggest + + Feedback +
    + +
    +
    +
    +
    + Fields of Science (FOS) +
    + +
    +
    ` }) @@ -38,7 +55,7 @@ export class FosComponent { @Output() viewAllClicked = new EventEmitter(); @Output() feedbackClicked = new EventEmitter(); public lessBtn: boolean = false; - public threshold: number = 2; + public threshold: number = 3; // was 2 public routerHelper: RouterHelper = new RouterHelper(); public properties = properties; public title: string = "Fields of Science"; diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index a7ddf8ba..5cac5a41 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -14,7 +14,7 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF
    -
    +
    @@ -42,8 +42,8 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF - {{entityType}} - + {{entityType}} + diff --git a/landingPages/landing-utils/sdg.component.ts b/landingPages/landing-utils/sdg.component.ts index 01ff2d60..368b0c04 100644 --- a/landingPages/landing-utils/sdg.component.ts +++ b/landingPages/landing-utils/sdg.component.ts @@ -6,34 +6,52 @@ import {StringUtils} from "../../utils/string-utils.class"; @Component({ selector: 'sdg', template: ` -
    Beta
    -
    - - - {{title}} - - {{title}} - - - View all & suggest - Feedback -
    - -
    - sdg_colors - -
    +
    +
    Beta
    +
    + + + {{title}} + + {{title}} + + + View all & suggest + Feedback +
    +
    + sdg_colors + +
    +
    +
    +
    + sdg_colors + SDGs: + + +
    +
    ` }) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b23d4e7b..560305a3 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -1,4 +1,5 @@ -
    + +
    @@ -6,14 +7,14 @@ + [searchActionRoute]="properties.searchLinkToResults">
    @@ -256,13 +257,13 @@ + [publishDate]="resultLandingInfo.dateofacceptance" + [journal]="resultLandingInfo.journal" [properties]="properties" class="uk-margin-small-top">
    -->
    + uk-sticky="bottom: true; media: @m" [attr.offset]="offset">
    - +
    + class="uk-margin-medium-bottom uk-width-2-3@m">
    Related {{openaireEntities.ORGANIZATIONS}}
    + class="uk-text-center"> View all @@ -371,8 +372,8 @@ [{{getReferenceIdName(id)}} OpenAIRE] + [queryParams]="{id: id.value}" + target="_blank">OpenAIRE]

    @@ -401,12 +402,12 @@ *ngFor="let keyIn of keysToArray(resultLandingInfo.bioentities.get(key)).slice((bioentitiesPage-1)*2*pageSize, bioentitiesPage*2*pageSize)"> @@ -442,7 +443,7 @@ {{word}} {{word}} + target="_blank" [href]="word">{{word}} @@ -670,7 +671,6 @@
    - @@ -681,7 +681,7 @@
    + [class.uk-animation-right]="viewAll">
    @@ -694,8 +694,8 @@
    + class="uk-offcanvas-switcher uk-flex uk-flex-center uk-flex-middle uk-hidden@m" + (click)="rightSidebarOffcanvasClicked = true;">
    @@ -749,14 +749,14 @@
    + && (!viewAll || viewAll=='egiNotebook')">
    Compatible EOSC Services
    eosc_logo + loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
    {{subject.value}} @@ -793,9 +793,131 @@ [properties]="properties" [entityType]="getTypeName()" [fields]="feedbackFields" [(showForm)]="showFeedback" [preSelectedField]="feedbackPreSelectedField">
    + + +
    +
    +
    + + {{resultLandingInfo.hostedBy_collectedFrom[0].accessRight}} +
    + + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    + +
    + Summary + +
    +
    +
    + +
    + References + +
    +
    +
    + +
    + Related Research + +
    +
    +
    + +
    + External Databases + +
    +
    +
    + +
    + Enermaps Tool + +
    +
    +
    + +
    + Compatible EOSC Services + +
    +
    + +
    + Funded by + +
    +
    +
    + +
    + Related to Research Communities + +
    +
    +
    +
    +
    + +
    + + #AlertModalDeletedByInference large="true"> + #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle"> @@ -854,9 +976,9 @@ class="uk-margin-bottom">
    {{header}}
    + input type="select" placeholder="Filter by relation" inputClass="flat x-small" + [options]="relatedClassFilters" [(value)]="relatedClassSelected" + (valueChange)="relatedClassChanged()">
    Date: Fri, 27 Jan 2023 14:42:09 +0200 Subject: [PATCH 07/95] Change my-tabs with new class landing-tab --- utils/tabs/tabs.component.ts | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/utils/tabs/tabs.component.ts b/utils/tabs/tabs.component.ts index 694be03d..bedd3cf7 100644 --- a/utils/tabs/tabs.component.ts +++ b/utils/tabs/tabs.component.ts @@ -16,8 +16,8 @@ import {TabComponent} from './tab.component'; @Component({ selector: 'my-tabs', template: ` -
    -
    +
    +
    @@ -50,7 +50,7 @@ import {TabComponent} from './tab.component';
    - --> -
    - -
    +
    + + +
    + +
    + + + Powered by + OpenAIRE Research Graph + + + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} + +
    + +
    + See an issue? + Report it here +
    +
    + + +
    + +
    + +
    +
    @@ -45,33 +72,7 @@
    - -
    - -
    - - - Powered by - OpenAIRE Research Graph - - - . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} - -
    - -
    - See an issue? - Report it here -
    -
    -
    - -
    - -
    - -
    +
    @@ -86,7 +87,7 @@
    -
    +
    @@ -184,8 +185,7 @@
    diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 0a1502fc..182e7bb5 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -32,18 +32,11 @@
    --> -
    -
    - -
    - -
    -
    +
    -
    +
    @@ -63,196 +56,206 @@
    -
    +
    - -
    -
    -
    -
    - - - - - View all {{organizationInfo.deletedByInferenceIds.length}} versions - - - - - - - - Share - - - - Download - + - -
    - - -
    - - - - -
    -
    - + + +
    + + + + + - - - - - - - - - -
    - - - -
    - Country: {{organizationInfo.country}} -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    - -
    - - - - -
    + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + + + + +
    +
    +
    diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 2762502d..265c6b80 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -71,17 +71,10 @@
    --> -
    -
    - -
    - -
    -
    +
    -
    +
    @@ -101,423 +94,463 @@
    -
    +
    - -
    -
    -
    -
    - - - - Link to - - - - Share - - - - Deposit - - - - Embed - - - - Download - +
    + +
    + +
    + +
    +
    + + + -
    - -
    - -
    - - - -
    - - - - -
    - - - - - + +
    + +
    +
    +
    + + + + + + + + + + + +
    +
    +
    + + Funder: + {{projectInfo.funding.funderName}} + + + Project code: + {{projectInfo.funding.code}} + + + Call for proposal: + {{projectInfo.funding.callIdentifier}} + +
    +
    + + Funded under: + {{projectInfo.funding.fundingStream}} + + + Overall Budget: + {{projectInfo.funding.budget | number}} + {{projectInfo.funding.currency}} + + + Funder Contribution: + {{projectInfo.funding.contribution | number}} + {{projectInfo.funding.currency}} + +
    +
    + + + +
    +
    Open Access mandate
    +
    + + {{openaireEntities.PUBLICATIONS}}: + No + + + {{openaireEntities.DATASETS}}: + No + +
    +
    +
    +
    +
    + +
    - - - - - - - -
    -
    -
    - - Funder: - {{projectInfo.funding.funderName}} - - - Project code: - {{projectInfo.funding.code}} - - - Call for proposal: - {{projectInfo.funding.callIdentifier}} - -
    -
    - - Funded under: - {{projectInfo.funding.fundingStream}} - - - Overall Budget: - {{projectInfo.funding.budget | number}} - {{projectInfo.funding.currency}} - - - Funder Contribution: - {{projectInfo.funding.contribution | number}} - {{projectInfo.funding.currency}} - -
    -
    - - - -
    -
    Open Access mandate
    -
    - - {{openaireEntities.PUBLICATIONS}}: - No - - - {{openaireEntities.DATASETS}}: - No - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Description
    -
    -
    -
    -
    - - View more - + +
    +
    + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + No summary information available +
    +
    +
    + +
    +
    +
    Description
    +
    +
    +
    +
    -
    -
    -
    -
    -
    - -
    Partners
    -
    - - -
    - View less -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    + +
    Partners
    +
    + + +
    + View less +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + +
    + + +
    +
    + +
    + + +
    +
    + + + + +
    +
    Statistics
    + +
    +
    +
    +
    Produced + {{openaireEntities.RESULTS}} per year +
    + +
    +
    +
    +
    +
    Access mode of + {{openaireEntities.RESULTS}} +
    + +
    +
    +
    +
    +
    + {{openaireEntities.RESULTS}} per datasource +
    + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    - -
    - - -
    -
    - - -
    - - -
    -
    - -
    - - -
    -
    - -
    - - -
    -
    - - - - -
    -
    Statistics
    - -
    -
    -
    -
    Produced - {{openaireEntities.RESULTS}} per year -
    - -
    -
    -
    -
    -
    Access mode of - {{openaireEntities.RESULTS}} -
    - -
    -
    -
    -
    -
    - {{openaireEntities.RESULTS}} per datasource -
    - -
    -
    -
    -
    -
    -
    - -
    - - -
    diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 560305a3..e336fcdd 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -68,17 +68,10 @@
    --> -
    -
    - -
    - -
    -
    +
    -
    +
    @@ -98,583 +91,595 @@
    -
    - -
    -
    -
    -
    - - - - - - - View all {{resultLandingInfo.deletedByInferenceIds.length}} versions - - - - - - - - Link to - - - - Share - - - - Cite - - - - - - - - + - -
    - - - -
    - - - - -
    - -
    - + +
    + + + +
    + + + + +
    + + + +
    + - + - + +
    + + + +
    + + +
    +
    + +
    - - - - - -
    - - -
    -
    - + + + + + + + +
    + +
    + +
    + + +
    - - - - - - - -
    - -
    - -
    - - - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - -
    -
    - -
    - -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Abstract
    -
    -
    -
    - -
    -
    -
    -
    - {{(resultLandingInfo.countries.length === 1) ? 'Country ' : 'Countries '}} -
    -
    - {{resultLandingInfo.countries.join(", ")}} + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    +
    + No summary information available
    -
    - - -
    - -
    -
    Related {{openaireEntities.ORGANIZATIONS}}
    - - -
    - View less -
    -
    -
    -
    - - -
    - - -
    -

    - {{item.name}} - - - [{{getReferenceIdName(id)}} - OpenAIRE] - - -

    -
    - - -
    -
    - - - - -
    - - -
    - - -
    -
    - {{keyIn}} -
    - - {{keyIn}} - -
    -
    -
    -
    - - -
    -
    - -
    -
    - Enermaps tool preview - -
    -
      - -
    • - {{detail[0]}}: - - - {{word}} - {{word}} - - -
    • -
      -
    -
    -
    - -
    - -
      - -
    • -
      -
      -
      -
      -
      - BIP! -
      - Impact by - BIP! -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - Citations - - {{resultLandingInfo.measure.citations}} -
      - - - Popularity - - {{resultLandingInfo.measure.popularity}} -
      - - - Influence - - {{resultLandingInfo.measure.influence}} -
      - - - Impulse - - {{resultLandingInfo.measure.impulse}} -
      -
      +
      + +
      +
      +
      Abstract
      +
      +
      -
      -
      - -
      -
      -
      -
      -
      - OpenAIRE UsageCounts -
      - Usage by - UsageCounts -
      -
      - - - - - - - - - - - - - -
      - - - Downloads - - {{resultLandingInfo.measure.downloads}} -
      - - - Views - - {{resultLandingInfo.measure.views}} -
      -
      +
      -
    • - -
    • -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - Citations - - {{resultLandingInfo.measure.citations}} -
      - - - Popularity - - {{resultLandingInfo.measure.popularity}} -
      - - - Influence - - {{resultLandingInfo.measure.influence}} -
      - - - Impulse - - {{resultLandingInfo.measure.impulse}} -
      +
      +
      + {{(resultLandingInfo.countries.length === 1) ? 'Country ' : 'Countries '}}
      -
      - Chart -
      -
      -
      - Powered by - BIP! - BIP! -
      -
    • - -
    • - -
    • - -
    • -
      - Stats -
      -
      -
      - - -
      -
      - -
      + {{resultLandingInfo.countries.join(", ")}}
      -
      - Powered by - OpenAIRE UsageCounts +
      + +
      -
    • -
    -
    -
    -
    -
    - - -
    + +
    +
    Related {{openaireEntities.ORGANIZATIONS}}
    + + +
    + View less +
    +
    +
    +
    +
    + +
    + + +
    +

    + {{item.name}} + + + [{{getReferenceIdName(id)}} + OpenAIRE] + + +

    +
    + + +
    +
    + + + + +
    + + +
    + + +
    +
    + {{keyIn}} +
    + + {{keyIn}} + +
    +
    +
    +
    + + +
    +
    + +
    +
    + Enermaps tool preview + +
    +
      + +
    • + {{detail[0]}}: + + + {{word}} + {{word}} + + +
    • +
      +
    +
    +
    + +
    + +
      + +
    • +
      +
      +
      +
      +
      + BIP! +
      + Impact by + BIP! +
      +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + + + Citations + + {{resultLandingInfo.measure.citations}} +
      + + + Popularity + + {{resultLandingInfo.measure.popularity}} +
      + + + Influence + + {{resultLandingInfo.measure.influence}} +
      + + + Impulse + + {{resultLandingInfo.measure.impulse}} +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      + OpenAIRE UsageCounts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{resultLandingInfo.measure.downloads}} +
      + + + Views + + {{resultLandingInfo.measure.views}} +
      +
      +
      +
      +
      +
    • + +
    • +
      +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + + + Citations + + {{resultLandingInfo.measure.citations}} +
      + + + Popularity + + {{resultLandingInfo.measure.popularity}} +
      + + + Influence + + {{resultLandingInfo.measure.influence}} +
      + + + Impulse + + {{resultLandingInfo.measure.impulse}} +
      +
      +
      + +
      +
      +
      + Powered by + BIP! + BIP! +
      +
    • + +
    • + +
    • + +
    • +
      +
      + Stats +
      +
      +
      + + +
      +
      + +
      +
      +
      +
      + Powered by + OpenAIRE UsageCounts +
      +
    • +
    +
    +
    +
    +
    + + +
    +
    +
    diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 4c5ab6a6..75ba17d1 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -72,6 +72,7 @@ export class ResultLandingComponent { public totalViews: number = null; public totalDownloads: number = null; public pageViews: number = null; + public bipFrameUrl: string; // Custom tab paging variables public referencesPage: number = 1; @@ -456,6 +457,7 @@ export class ResultLandingComponent { this.viewsFrameUrl = this.properties.statisticsFrameNewAPIURL + 'chart?json=' + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly views","type":"column","query":{"name":"usagestats.results.views.monthly", "parameters":["' + this.id + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Monthly views"},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":""}}}'); this.downloadsFrameUrl = this.properties.statisticsFrameNewAPIURL + 'chart?json=' + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"column","query":{"name":"usagestats.results.downloads.monthly", "parameters":["' + this.id + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Monthly downloads"},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":""}}}'); + this.bipFrameUrl = this.properties.bipFrameAPIURL + this.id; let pid:Identifier = Identifier.getPIDFromIdentifiers(this.resultLandingInfo.identifiers); if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType this.updateUrlWithType(pid); diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 72212d64..d8ff3308 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -428,8 +428,6 @@ export class ResultLandingService { this.resultLandingInfo.measure['influence'] = 'Top 1%'; } else if (data[0].measure[i].class == 'C4') { this.resultLandingInfo.measure['influence'] = 'Top 10%'; - } else if (data[0].measure[i].class == 'C5') { - this.resultLandingInfo.measure['influence'] = 'Average/low'; } else if (data[0].measure[i].class == 'A') { this.resultLandingInfo.measure['influence'] = 'Exceptional'; } else if (data[0].measure[i].class == 'B') { @@ -447,8 +445,6 @@ export class ResultLandingService { this.resultLandingInfo.measure['popularity'] = 'Top 1%'; } else if (data[0].measure[i].class == 'C4') { this.resultLandingInfo.measure['popularity'] = 'Top 10%'; - } else if (data[0].measure[i].class == 'C5') { - this.resultLandingInfo.measure['popularity'] = 'Average/low'; } else if (data[0].measure[i].class == 'A') { this.resultLandingInfo.measure['popularity'] = 'Exceptional'; } else if (data[0].measure[i].class == 'B') { @@ -469,8 +465,6 @@ export class ResultLandingService { this.resultLandingInfo.measure['impulse'] = 'Top 1%'; } else if (data[0].measure[i].class == 'C4') { this.resultLandingInfo.measure['impulse'] = 'Top 10%'; - } else if (data[0].measure[i].class == 'C5') { - this.resultLandingInfo.measure['impulse'] = 'Average/low'; } else if (data[0].measure[i].class == 'A') { this.resultLandingInfo.measure['impulse'] = 'Exceptional'; } else if (data[0].measure[i].class == 'B') { diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index e026e951..0b450eb7 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -213,8 +213,6 @@ export class SearchResearchResultsService { result.measure[3] = 'Top 1% in'; } else if (resData['measure'][i].class == 'C4') { result.measure[3] = 'Top 10% in'; - } else if (resData['measure'][i].class == 'C5') { - result.measure[3] = 'Average/low'; } else if (resData['measure'][i].class == 'A') { result.measure[3] = 'Exceptional'; } else if (resData['measure'][i].class == 'B') { @@ -233,8 +231,6 @@ export class SearchResearchResultsService { result.measure[2] = 'Top 1% in'; } else if (resData['measure'][i].class == 'C4') { result.measure[2] = 'Top 10% in'; - } else if (resData['measure'][i].class == 'C5') { - result.measure[2] = 'Average/low'; } else if (resData['measure'][i].class == 'A') { result.measure[2] = 'Exceptional'; } else if (resData['measure'][i].class == 'B') { diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index f0f7aacf..a89f9d38 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -17,6 +17,7 @@ export interface EnvProperties { framesAPIURL?: string; statisticsFrameAPIURL?: string; statisticsFrameNewAPIURL?: string; + bipFrameAPIURL?: string; useNewStatistisTool?: boolean; useOldStatisticsSchema?: boolean; monitorStatsFrameUrl?:string; From 5c9470a959a08a12ff34e032b0d6f06e359d21e7 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 13 Feb 2023 15:51:15 +0200 Subject: [PATCH 09/95] fix for 'collected from' link that was not working, coloring of new access icons and bip/usage icons, metrics tabs and charts - all landing pages --- .../dataProvider/dataProvider.component.html | 288 +++++++++++----- .../dataProvider/dataProvider.component.ts | 36 +- .../landing-utils/availableOn.component.ts | 12 +- .../landing-header.component.ts | 25 +- .../landing-header/landing-header.module.ts | 3 +- landingPages/project/project.component.html | 131 +++++-- landingPages/project/project.component.ts | 36 +- .../result/resultLanding.component.html | 325 +++++++++--------- .../result/resultLanding.component.ts | 12 + landingPages/result/resultLanding.service.ts | 10 +- 10 files changed, 581 insertions(+), 297 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 2bd0a011..c1084fa7 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -79,7 +79,7 @@ - + Share
    @@ -90,93 +90,121 @@
    - - - -
    - -
    - - - - - - - - - + + +
    - {{country}} + + + + +
    - - - -
    - Thematic
    -
    -
    --> - - - - - -
    - + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    Downloads
    +
    Views
    +
    +
    +
    {{totalDownloads | number}}
    +
    {{totalViews | number}}
    +
    +
    +
    +
    + Metrics badge +
    +
    +
    @@ -220,6 +248,9 @@ || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)" [tabTitle]="'Related '+openaireEntities.DATASOURCES" [tabId]="'relatedDatasources'"> + + @@ -436,6 +467,93 @@
    + + +
    + +
      + +
    • +
      +
      +
      +
      + OpenAIRE UsageCounts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{totalDownloads | number}} +
      + + + Views + + {{totalViews | number}} +
      +
      +
      +
      +
    • + +
    • +
      +
      +
      +
      {{formatNumber(totalDownloads)}}
      +
      Downloads
      +
      +
      +
      {{formatNumber(totalViews)}}
      +
      Views
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      + Powered by + OpenAIRE UsageCounts +
      +
    • +
    +
    +
    diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index c5df0b83..b11ba7c4 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -25,9 +25,11 @@ import {SearchResult} from "../../utils/entities/searchResult"; import {ResultPreview} from "../../utils/result-preview/result-preview"; import {IndexInfoService} from "../../utils/indexInfo.service"; import {properties} from "../../../../environments/environment"; -import {Subscriber} from "rxjs"; +import {Subscriber, Subscription, zip} from "rxjs"; import {TabComponent} from "../../utils/tabs/tab.component"; import {OpenaireEntities} from "../../utils/properties/searchFields"; +import {MetricsService} from '../../services/metrics.service'; +import {NumberUtils} from '../../utils/number-utils.class'; declare var ResizeObserver; @@ -63,7 +65,7 @@ export class DataProviderComponent { public downloadsFrameUrl: string; public totalViews: number; public totalDownloads: number; - public pageViews: number; + // public pageViews: number; // Statistics tab variables public statsClicked: boolean = false; @@ -141,6 +143,7 @@ export class DataProviderComponent { // public shouldSticky: boolean = true; subscriptions = []; + private sub: Subscription; properties: EnvProperties = properties; public openaireEntities = OpenaireEntities; @@ -157,6 +160,7 @@ export class DataProviderComponent { private helper: HelperService, private _location: Location, private indexInfoService: IndexInfoService, + private metricsService: MetricsService, private cdr: ChangeDetectorRef) { this.fetchPublications = new FetchResearchResults(this._searchResearchResultsService); this.fetchDatasets = new FetchResearchResults(this._searchResearchResultsService); @@ -210,6 +214,7 @@ export class DataProviderComponent { } }); } + this.getMetrics(); })); } @@ -665,11 +670,23 @@ export class DataProviderComponent { public metricsResults($event) { this.totalViews = $event.totalViews; this.totalDownloads = $event.totalDownloads; - this.pageViews = $event.pageViews; + // this.pageViews = $event.pageViews; } + private getMetrics() { + let obs; + obs = zip(this.metricsService.getMetricsNumber(this.datasourceId, "usagestats.views.repository.local", this.properties), + this.metricsService.getMetricsNumber(this.datasourceId, "usagestats.downloads.repository.local", this.properties)); + this.sub = obs.subscribe(data => { + console.log(data); + this.totalViews = data[0]; + this.totalDownloads = data[1]; + this.cdr.detectChanges(); + }); + } + public get hasMetrics(): boolean { - return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; + return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; } // public openStatistics() { @@ -827,4 +844,15 @@ export class DataProviderComponent { this.descriptionModal.alertTitle = "Description"; this.descriptionModal.open(); } + + public clickedUsageMetrics() { + setTimeout( () => { + this.metricsClicked = true; + }); + } + + public formatNumber(num: number | string) { + let formatted = NumberUtils.roundNumber(+num); + return formatted.number + formatted.size; + } } diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 7a7c182c..edab04cb 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -11,9 +11,9 @@ declare var UIkit;
    - - + {{sliceString(availableOn[0].downloadNames.join("; "), 20)}} @@ -24,9 +24,9 @@ declare var UIkit;
    - - +
    @@ -63,7 +63,7 @@ declare var UIkit; - - + *ngIf="(openAccessMandatePublications != undefined && openAccessMandatePublications) || (openAccessMandateDatasets != undefined && openAccessMandateDatasets)"> + + @@ -38,25 +38,25 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + type="outlined" [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> {{entityType}} - + {{removeUnknown(types, true).join(' , ')}} @@ -120,8 +120,7 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF - - + diff --git a/landingPages/landing-utils/landing-header/landing-header.module.ts b/landingPages/landing-utils/landing-header/landing-header.module.ts index 069a17b5..6ae684c9 100644 --- a/landingPages/landing-utils/landing-header/landing-header.module.ts +++ b/landingPages/landing-utils/landing-header/landing-header.module.ts @@ -5,9 +5,10 @@ import {LandingModule} from "../landing.module"; import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module"; import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module"; import {ShowPublisherModule} from "../showPublisher.module"; +import {RouterModule} from "@angular/router"; @NgModule({ - imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule], + imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule, RouterModule], declarations: [LandingHeaderComponent], exports: [LandingHeaderComponent] }) diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 265c6b80..47104db2 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -152,7 +152,7 @@
    -
    +
    -
    - +
    + Metrics badge +
    +
    @@ -386,6 +384,9 @@ [tabTitle]="openaireEntities.OTHER" [tabNumber]="fetchOrps.searchUtils.totalResults" [tabId]="'other'"> + + @@ -500,6 +501,92 @@
    + +
    + +
      + +
    • +
      +
      +
      +
      + OpenAIRE UsageCounts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{totalDownloads | number}} +
      + + + Views + + {{totalViews | number}} +
      +
      +
      +
      +
    • + +
    • +
      +
      +
      +
      {{formatNumber(totalDownloads)}}
      +
      Downloads
      +
      +
      +
      {{formatNumber(totalViews)}}
      +
      Views
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      + Powered by + OpenAIRE UsageCounts +
      +
    • +
    +
    +
    diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 56622846..d3fc955b 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -25,10 +25,12 @@ import {StringUtils} from "../../utils/string-utils.class"; import {ResultPreview} from "../../utils/result-preview/result-preview"; import {SearchResult} from "../../utils/entities/searchResult"; import {IndexInfoService} from "../../utils/indexInfo.service"; -import {Subscriber} from "rxjs"; +import {Subscriber, zip, Subscription} from "rxjs"; import {properties} from "../../../../environments/environment"; import {Option} from "../../sharedComponents/input/input.component"; import {OpenaireEntities} from "../../utils/properties/searchFields"; +import {MetricsService} from '../../services/metrics.service'; +import {NumberUtils} from '../../utils/number-utils.class'; declare var ResizeObserver; @@ -50,7 +52,7 @@ export class ProjectComponent { public downloadsFrameUrl: string; public totalViews: number; public totalDownloads: number; - public pageViews: number; + // public pageViews: number; // Statistics tab variables public statsClicked: boolean; @@ -160,6 +162,7 @@ export class ProjectComponent { // public shouldSticky: boolean = true; subscriptions = []; + private sub: Subscription; properties: EnvProperties; public openaireEntities = OpenaireEntities; @@ -176,6 +179,7 @@ export class ProjectComponent { private _reportsService: ReportsService, private htmlService: HtmlProjectReportService, private indexInfoService: IndexInfoService, + private metricsService: MetricsService, private cdr: ChangeDetectorRef) {} ngOnInit() { @@ -230,6 +234,8 @@ export class ProjectComponent { this.downloadURLAPI = this.properties.csvAPIURL; this.createClipboard(); + + this.getMetrics(); })); } @@ -552,11 +558,22 @@ export class ProjectComponent { public metricsResults($event) { this.totalViews = $event.totalViews; this.totalDownloads = $event.totalDownloads; - this.pageViews = $event.pageViews; + // this.pageViews = $event.pageViews; } + private getMetrics() { + let obs; + obs = zip(this.metricsService.getMetricsNumber(this.projectId, "usagestats.projects.views", this.properties), + this.metricsService.getMetricsNumber(this.projectId, "usagestats.projects.downloads", this.properties)); + this.sub = obs.subscribe(data => { + this.totalViews = data[0]; + this.totalDownloads = data[1]; + this.cdr.detectChanges(); + }); + } + public get hasMetrics(): boolean { - return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0||this.pageViews > 0; + return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; } public viewAllOrganizationsClick() { @@ -961,4 +978,15 @@ export class ProjectComponent { this.descriptionModal.alertTitle = "Description"; this.descriptionModal.open(); } + + public clickedUsageMetrics() { + setTimeout( () => { + this.metricsClicked = true; + }); + } + + public formatNumber(num: number | string) { + let formatted = NumberUtils.roundNumber(+num); + return formatted.number + formatted.size; + } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index e336fcdd..1fd5e19a 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -115,7 +115,7 @@ - + View all {{resultLandingInfo.deletedByInferenceIds.length}} versions @@ -127,17 +127,17 @@ [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder"> - + Link to - + Share - + Cite @@ -464,14 +464,14 @@ Social
  • - Usage + Usage