Merging explore-redesign branch into develop for Explore July release #7
|
@ -2,7 +2,7 @@ import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Inject,
|
Inject, Input,
|
||||||
OnInit,
|
OnInit,
|
||||||
Output,
|
Output,
|
||||||
RendererFactory2,
|
RendererFactory2,
|
||||||
|
@ -28,7 +28,7 @@ declare var addthis: addthis;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'addThis',
|
selector: 'addThis',
|
||||||
template: `
|
template: `
|
||||||
<div id="addThis" class="addthis_inline_share_toolbox_lcx9_8cfy"></div>
|
<div id="addThis" class="addthis_inline_share_toolbox_lcx9_8cfy" [attr.data-url]="url"></div>
|
||||||
<div *ngIf="showWarning" class="uk-alert uk-alert-warning uk-animation-fade">
|
<div *ngIf="showWarning" class="uk-alert uk-alert-warning uk-animation-fade">
|
||||||
Do the share buttons not appear? Please make sure, any blocking addon is disabled, and then reload the page.
|
Do the share buttons not appear? Please make sure, any blocking addon is disabled, and then reload the page.
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,7 +37,11 @@ declare var addthis: addthis;
|
||||||
export class AddThisComponent implements OnInit {
|
export class AddThisComponent implements OnInit {
|
||||||
subs = [];
|
subs = [];
|
||||||
showWarning = false;
|
showWarning = false;
|
||||||
constructor(private route: ActivatedRoute, @Inject(DOCUMENT) private document, private rendererFactory: RendererFactory2) {}
|
@Input() url: string = null;
|
||||||
|
|
||||||
|
constructor(private route: ActivatedRoute, @Inject(DOCUMENT) private document, private rendererFactory: RendererFactory2) {
|
||||||
|
}
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
for (let value of this.subs) {
|
for (let value of this.subs) {
|
||||||
if (value instanceof Subscriber) {
|
if (value instanceof Subscriber) {
|
||||||
|
@ -47,6 +51,7 @@ export class AddThisComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.subs.push(this.route.queryParams.subscribe(data => {
|
this.subs.push(this.route.queryParams.subscribe(data => {
|
||||||
|
|
|
@ -4,14 +4,16 @@ import {properties} from "../../../../environments/environment";
|
||||||
import {StringUtils} from '../../utils/string-utils.class';
|
import {StringUtils} from '../../utils/string-utils.class';
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'availableOn',
|
selector: 'availableOn',
|
||||||
template: `
|
template: `
|
||||||
<ng-container *ngIf="availableOn">
|
<ng-container *ngIf="availableOn">
|
||||||
<div class="uk-flex uk-flex-middle uk-flex-center">
|
<div class="uk-flex uk-flex-middle">
|
||||||
<ng-container *ngIf="availableOn[0].downloadUrl">
|
<ng-container *ngIf="availableOn[0].downloadUrl">
|
||||||
<span class="uk-margin-xsmall-right">Source: </span>
|
<span *ngIf="source" class="uk-margin-xsmall-right">Source: </span>
|
||||||
<span [class]="'uk-margin-xsmall-right ' + (availableOn[0].accessRightIcon == 'open_access' ? 'open-access' : 'uk-text-meta')"
|
<span
|
||||||
|
[class]="'uk-margin-xsmall-right ' + (availableOn[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||||
uk-tooltip [title]="availableOn[0].accessRight ? availableOn[0].accessRight : 'Not available'">
|
uk-tooltip [title]="availableOn[0].accessRight ? availableOn[0].accessRight : 'Not available'">
|
||||||
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="0.8"></icon>
|
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="0.8"></icon>
|
||||||
</span>
|
</span>
|
||||||
|
@ -20,14 +22,14 @@ declare var UIkit;
|
||||||
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
||||||
</a>
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<a class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
<a class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
||||||
<icon [flex]="true" [name]="'expand_' + (isOpen?'less':'more')"></icon>
|
<icon [flex]="true" [name]="'expand_' + (isOpen?'less':'more')"></icon>
|
||||||
</a>
|
</a>
|
||||||
|
<div #dropElement uk-drop="mode: click; pos: bottom-left;"
|
||||||
<div #dropElement uk-drop="mode: click; pos: bottom-left;" class="download-drop uk-card uk-card-default uk-padding-small uk-padding-remove-horizontal uk-text-small">
|
class="download-drop uk-card uk-card-default uk-padding-small uk-padding-remove-horizontal uk-text-small">
|
||||||
<div *ngFor="let instance of availableOn let i=index" class="download-drop-item uk-flex uk-flex-top">
|
<div *ngFor="let instance of availableOn let i=index" class="download-drop-item uk-flex uk-flex-top">
|
||||||
<span [class]="'uk-margin-small-right ' + (instance.accessRightIcon == 'open_access' ? 'open-access' : 'uk-text-meta')"
|
<span
|
||||||
|
[class]="'uk-margin-small-right ' + (instance.accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||||
uk-tooltip [title]="instance.accessRight ? instance.accessRight : 'Not available'">
|
uk-tooltip [title]="instance.accessRight ? instance.accessRight : 'Not available'">
|
||||||
<icon [name]="instance.accessRightIcon" [flex]="true"></icon>
|
<icon [name]="instance.accessRightIcon" [flex]="true"></icon>
|
||||||
</span>
|
</span>
|
||||||
|
@ -39,7 +41,8 @@ declare var UIkit;
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0" class="uk-text-meta">
|
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0" class="uk-text-meta">
|
||||||
<span *ngIf="instance.types?.length > 0" class="uk-text-capitalize">{{instance.types.join(" . ")}}</span>
|
<span *ngIf="instance.types?.length > 0"
|
||||||
|
class="uk-text-capitalize">{{instance.types.join(" . ")}}</span>
|
||||||
<span *ngIf="instance.types?.length > 0 && instance.years?.length > 0"> . </span>
|
<span *ngIf="instance.types?.length > 0 && instance.years?.length > 0"> . </span>
|
||||||
<span *ngIf="instance.years?.length > 0">{{instance.years.join(" . ")}}</span>
|
<span *ngIf="instance.years?.length > 0">{{instance.years.join(" . ")}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,9 +56,12 @@ declare var UIkit;
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="instance.collectedNamesAndIds?.size > 0" class="uk-text-meta">
|
<div *ngIf="instance.collectedNamesAndIds?.size > 0" class="uk-text-meta">
|
||||||
<span>Providers: </span>
|
<span>Providers: </span>
|
||||||
<a *ngFor="let collectedName of getKeys(instance.collectedNamesAndIds); let i=index" [routerLink]="dataProviderUrl"
|
<a *ngFor="let collectedName of getKeys(instance.collectedNamesAndIds); let i=index"
|
||||||
[queryParams]="{datasourceId: instance.collectedNamesAndIds.get(collectedName)}" class="uk-link-text">
|
[routerLink]="dataProviderUrl"
|
||||||
{{collectedName}}<ng-container *ngIf="(i !== (instance.collectedNamesAndIds.size - 1))">; </ng-container>
|
[queryParams]="{datasourceId: instance.collectedNamesAndIds.get(collectedName)}"
|
||||||
|
class="uk-link-text">
|
||||||
|
{{collectedName}}
|
||||||
|
<ng-container *ngIf="(i !== (instance.collectedNamesAndIds.size - 1))">;</ng-container>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,89 +69,15 @@ declare var UIkit;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- <div class="uk-margin-small-bottom uk-flex uk-flex-between">
|
|
||||||
<span *ngIf="viewAll && !lessBtn" class="clickable uk-h6 uk-flex uk-flex-middle" (click)="viewLessClick()">
|
|
||||||
<icon class="uk-margin-small-right" name="arrow_back" [flex]="true" ratio="1.2"></icon>
|
|
||||||
{{title}}
|
|
||||||
</span>
|
|
||||||
<span *ngIf="!viewAll || lessBtn" class="uk-margin-small-bottom uk-flex uk-flex-middle">
|
|
||||||
<span class="uk-text-light-grey uk-margin-small-right">Download from</span>
|
|
||||||
</span>
|
|
||||||
<a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;" class="view-more-less-link">View less</a>
|
|
||||||
<a *ngIf="availableOn && availableOn.length > threshold && !viewAll" class="view-more-less-link"
|
|
||||||
(click)="viewAllClick();">View all {{availableOn.length}} sources</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="availableOn" class="download-from uk-margin-small-bottom">
|
|
||||||
<div *ngFor="let instance of availableOn.slice(0, viewAll?availableOn.length:threshold) let i=index"
|
|
||||||
class="uk-flex uk-flex-top uk-padding-small uk-margin-small-bottom"
|
|
||||||
uk-tooltip [title]="instance.accessRight ? instance.accessRight : 'Not available'">
|
|
||||||
<span [class]="'uk-margin-small-right ' + (instance.accessRightIcon == 'lock_open' ? 'uk-text-success' : 'uk-text-meta')"
|
|
||||||
uk-tooltip [title]="instance.accessRight ? instance.accessRight : 'Not available'">
|
|
||||||
<icon [name]="instance.accessRightIcon" [flex]="true" type="outlined"></icon>
|
|
||||||
</span>
|
|
||||||
<div class="uk-width-expand uk-padding-small uk-padding-remove-left uk-padding-remove-vertical">
|
|
||||||
<span class="uk-text-emphasis">
|
|
||||||
<a *ngIf="instance.downloadUrl" [href]="instance.downloadUrl" target="_blank"
|
|
||||||
class="title uk-link-text uk-text-bold custom-external uk-display-inline-block">
|
|
||||||
{{instance.downloadNames.join("; ")}}
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0" class="uk-text-meta">
|
|
||||||
<span *ngIf="instance.types?.length > 0" class="uk-text-capitalize">{{instance.types.join(" . ")}}</span>
|
|
||||||
<span *ngIf="instance.types?.length > 0 && instance.years?.length > 0"> . </span>
|
|
||||||
<span *ngIf="instance.years?.length > 0">{{instance.years.join(" . ")}}</span>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="instance.license" class="uk-text-meta uk-text-truncate" uk-tooltip [title]="instance.license">
|
|
||||||
License:
|
|
||||||
<a *ngIf="isUrl(instance.license); else elseBlock"
|
|
||||||
[href]="instance.license" target="_blank" class="custom-external uk-link-text">
|
|
||||||
{{instance.license}}
|
|
||||||
</a>
|
|
||||||
<ng-template #elseBlock> {{instance.license}}</ng-template>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="instance.collectedNamesAndIds?.size > 0" class="uk-text-meta">
|
|
||||||
<span>Providers: </span>
|
|
||||||
<a *ngFor="let collectedName of getKeys(instance.collectedNamesAndIds); let i=index" [routerLink]="dataProviderUrl"
|
|
||||||
[queryParams]="{datasourceId: instance.collectedNamesAndIds.get(collectedName)}" class="uk-link-text">
|
|
||||||
{{collectedName}}<ng-container *ngIf="(i !== (instance.collectedNamesAndIds.size - 1))">; </ng-container>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div *ngIf="showNum > threshold" class="uk-margin-bottom">-->
|
|
||||||
<!-- <a (click)="showNum = threshold;" class="uk-flex uk-flex-middle uk-flex-center">-->
|
|
||||||
<!-- <span>View less</span>-->
|
|
||||||
<!-- <span class="space uk-icon">-->
|
|
||||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="chevron-up">-->
|
|
||||||
<!-- <polyline fill="none" stroke="#000" stroke-width="1.03" points="4 13 10 7 16 13"></polyline>-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </a>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div *ngIf="showNum == threshold && availableOn && availableOn.length > 5" class="uk-margin-bottom">-->
|
|
||||||
<!-- <a (click)="showNum = availableOn.length;" class="uk-flex uk-flex-middle uk-flex-center">-->
|
|
||||||
<!-- <span>View more</span>-->
|
|
||||||
<!-- <span class="space uk-icon">-->
|
|
||||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="chevron-down">-->
|
|
||||||
<!-- <polyline fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline>-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </a>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
export class AvailableOnComponent {
|
export class AvailableOnComponent {
|
||||||
@Input() availableOn: HostedByCollectedFrom[];
|
@Input() availableOn: HostedByCollectedFrom[];
|
||||||
@Input() viewAll: boolean = false;
|
@Input() source: boolean = true;
|
||||||
|
/** @deprecated */
|
||||||
@Output() viewAllClicked = new EventEmitter();
|
@Output() viewAllClicked = new EventEmitter();
|
||||||
@ViewChild("dropElement") dropElement: ElementRef;
|
@ViewChild("dropElement") dropElement: ElementRef;
|
||||||
public lessBtn: boolean = false;
|
|
||||||
public threshold: number = 1;
|
public threshold: number = 1;
|
||||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||||
public title: string = "Download from";
|
public title: string = "Download from";
|
||||||
|
@ -156,32 +88,10 @@ export class AvailableOnComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeUnknown(value: string): string {
|
|
||||||
if (value.toLowerCase() === 'unknown') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getKeys(map) {
|
public getKeys(map) {
|
||||||
return Array.from(map.keys());
|
return Array.from(map.keys());
|
||||||
}
|
}
|
||||||
|
|
||||||
public viewAllClick() {
|
|
||||||
if(this.availableOn.length <= this.threshold*2) {
|
|
||||||
this.viewAll = true;
|
|
||||||
this.lessBtn = true;
|
|
||||||
} else {
|
|
||||||
this.viewAll = true;
|
|
||||||
this.viewAllClicked.emit('availableOn');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public viewLessClick() {
|
|
||||||
this.viewAll = false;
|
|
||||||
this.viewAllClicked.emit("");
|
|
||||||
}
|
|
||||||
|
|
||||||
public isUrl(str: string): boolean {
|
public isUrl(str: string): boolean {
|
||||||
return str.startsWith('http://') || str.startsWith('https://') || str.startsWith('//') || str.startsWith('www.');
|
return str.startsWith('http://') || str.startsWith('https://') || str.startsWith('//') || str.startsWith('www.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import {DOCUMENT} from "@angular/common";
|
||||||
import {EnvProperties} from "../../../utils/properties/env-properties";
|
import {EnvProperties} from "../../../utils/properties/env-properties";
|
||||||
import {properties} from "../../../../../environments/environment";
|
import {properties} from "../../../../../environments/environment";
|
||||||
import {PiwikService} from "../../../utils/piwik/piwik.service";
|
import {PiwikService} from "../../../utils/piwik/piwik.service";
|
||||||
|
import {ResultPreview} from "../../../utils/result-preview/result-preview";
|
||||||
|
|
||||||
declare var Cite: any;
|
declare var Cite: any;
|
||||||
// Based on https://citation.js.org/api/tutorial-getting_started.html browser release
|
// Based on https://citation.js.org/api/tutorial-getting_started.html browser release
|
||||||
|
@ -53,7 +54,7 @@ export class CiteThisComponent implements OnInit, OnDestroy {
|
||||||
properties:EnvProperties;
|
properties:EnvProperties;
|
||||||
public citationText: string;
|
public citationText: string;
|
||||||
public citation: Citation = new Citation();
|
public citation: Citation = new Citation();
|
||||||
@Input() result: ResultLandingInfo;
|
@Input() result: any;
|
||||||
@Input() id: string;
|
@Input() id: string;
|
||||||
@Input() type: string = "article";
|
@Input() type: string = "article";
|
||||||
@Input() piwikSiteId;
|
@Input() piwikSiteId;
|
||||||
|
|
|
@ -0,0 +1,228 @@
|
||||||
|
import {Component, Input} from "@angular/core";
|
||||||
|
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||||
|
import {properties} from "../../../../environments/environment";
|
||||||
|
import {OpenaireEntities} from "../../utils/properties/searchFields";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'entity-metadata',
|
||||||
|
template: `
|
||||||
|
<div class="uk-text-xsmall uk-text-emphasis uk-flex uk-flex-middle uk-flex-wrap">
|
||||||
|
<!-- oa -->
|
||||||
|
<ng-container *ngIf="(openAccessMandatePublications != undefined && openAccessMandatePublications) || (openAccessMandateDatasets != undefined && openAccessMandateDatasets)">
|
||||||
|
<span class="uk-margin-xsmall-right open-access">
|
||||||
|
<icon name="open_access" [flex]="true" [ratio]="0.8"></icon>
|
||||||
|
</span>
|
||||||
|
<span class="uk-text-bolder"
|
||||||
|
*ngIf="openAccessMandatePublications != undefined && openAccessMandatePublications && openAccessMandateDatasets != undefined && openAccessMandateDatasets">
|
||||||
|
Open Access Mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}
|
||||||
|
</span>
|
||||||
|
<span class="uk-text-bolder"
|
||||||
|
*ngIf="openAccessMandatePublications != undefined && openAccessMandatePublications && (openAccessMandateDatasets == undefined || !openAccessMandateDatasets)">
|
||||||
|
Open Access Mandate for {{openaireEntities.PUBLICATIONS}}
|
||||||
|
</span>
|
||||||
|
<span class="uk-text-bolder"
|
||||||
|
*ngIf="openAccessMandateDatasets != undefined && openAccessMandateDatasets && (openAccessMandatePublications == undefined || !openAccessMandatePublications)">
|
||||||
|
Open Access Mandate for {{openaireEntities.DATASETS}}
|
||||||
|
</span>
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
</ng-container>
|
||||||
|
<!-- types -->
|
||||||
|
<span *ngIf="entityType" class="uk-margin-xsmall-right">
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'publication'" name="description" type="outlined"
|
||||||
|
[flex]="true" [ratio]="0.8"></icon>
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'research data'" name="database" type="outlined"
|
||||||
|
[flex]="true" [ratio]="0.8"></icon>
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'research software'" name="integration_instructions"
|
||||||
|
type="outlined" [flex]="true" [ratio]="0.8"></icon>
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'other research product'" name="apps" type="outlined"
|
||||||
|
[flex]="true" [ratio]="0.8"></icon>
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'project'" name="assignment_turned_in" type="outlined"
|
||||||
|
[flex]="true" [ratio]="0.8"></icon>
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'data source'" name="note_add" type="outlined"
|
||||||
|
[flex]="true" [ratio]="0.8"></icon>
|
||||||
|
<icon *ngIf="entityType.toLowerCase() == 'organization'" name="corporate_fare" type="outlined"
|
||||||
|
[flex]="true" [ratio]="0.8"></icon>
|
||||||
|
</span>
|
||||||
|
<u *ngIf="entityType" class="uk-text-capitalize uk-text-bolder">{{entityType}}</u>
|
||||||
|
<span *ngIf="entityType && types && removeUnknown(types, true).length > 0">
|
||||||
|
<icon name="keyboard_double_arrow_right" [flex]="true" [ratio]="0.8"></icon>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="types && removeUnknown(types, true).length > 0" class="uk-text-italic">
|
||||||
|
{{removeUnknown(types, true).join(' , ')}}
|
||||||
|
</span>
|
||||||
|
<!-- years -->
|
||||||
|
<ng-container *ngIf="year">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{year}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="startYear && !endYear">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{startYear}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="!startYear && endYear">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{endYear}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="startYear && endYear">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<ng-container *ngIf="startDate">
|
||||||
|
<span>{{startYear}} - {{endYear}}</span>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<!-- dates -->
|
||||||
|
<ng-container *ngIf="startDate && !endDate">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span class="uk-margin-xsmall-right">From</span>
|
||||||
|
<span>{{startDate | date: 'dd MMM yyyy'}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="!startDate && endDate">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span class="uk-margin-xsmall-right">Until</span>
|
||||||
|
<span>{{endDate | date: 'dd MMM yyyy'}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="startDate && endDate">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<ng-container *ngIf="startDate">
|
||||||
|
<span>{{startDate | date: 'dd MMM yyyy'}}</span>
|
||||||
|
<span class="uk-margin-xsmall-left">(Started)</span>
|
||||||
|
</ng-container>
|
||||||
|
<span *ngIf="startDate && endDate" class="uk-margin-xsmall-left uk-margin-xsmall-right">-</span>
|
||||||
|
<ng-container *ngIf="endDate">
|
||||||
|
<span>{{endDate | date: 'dd MMM yyyy'}}</span>
|
||||||
|
<span class="uk-margin-xsmall-left">{{currentDate >= endDate ? '(Ended)' : '(Ending)'}}</span>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="status && status != ''">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{status}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="date">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="embargoEndDate">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<span *ngIf="underCuration">
|
||||||
|
. <span title="{{buildCurationTooltip()}}"
|
||||||
|
uk-tooltip="pos:bottom-right; delay:10;"
|
||||||
|
class="uk-text-primary">Under curation</span>
|
||||||
|
</span>
|
||||||
|
<!-- countries -->
|
||||||
|
<ng-container *ngIf="countries && removeUnknown(countries).length > 0">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<ng-container *ngFor="let country of removeUnknown(countries)">
|
||||||
|
<span>{{country}}</span>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<!-- languages -->
|
||||||
|
<ng-container *ngIf="languages && removeUnknown(languages).length > 0">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<ng-container *ngFor="let language of removeUnknown(languages)">
|
||||||
|
<span>{{language}}</span>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<!-- programming languages -->
|
||||||
|
<ng-container *ngIf="programmingLanguages && programmingLanguages.length > 0">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<ng-container *ngFor="let programmingLanguage of programmingLanguages">
|
||||||
|
<span>{{programmingLanguage}}</span>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<!-- published info -->
|
||||||
|
<showPublisher [publisher]="publisher" [journal]="journal" [properties]="properties"></showPublisher>
|
||||||
|
<!-- data provider labels -->
|
||||||
|
<ng-container *ngIf="compatibility && !(compatibility.info == 'not available' && type == 'service')">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span title="Compatibility">
|
||||||
|
<a *ngIf="compatibility.id"
|
||||||
|
[queryParams]="{datasourceId: compatibility.id}" routerLinkActive="router-link-active"
|
||||||
|
[routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
||||||
|
{{compatibility.info}}
|
||||||
|
<ng-container *ngIf="compatibility.name">{{compatibility.name}}</ng-container>
|
||||||
|
</a>
|
||||||
|
<span *ngIf="!compatibility.id && compatibility.info">
|
||||||
|
<ng-container
|
||||||
|
*ngIf="compatibility.info.toLowerCase() != 'not yet registered'">{{compatibility.info}}</ng-container>
|
||||||
|
<ng-container *ngIf="compatibility.info.toLowerCase() == 'not yet registered'">
|
||||||
|
{{compatibility.info}} <span *ngIf="properties.adminToolsPortalType == 'eosc'">in OpenAIRE</span>
|
||||||
|
</ng-container>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="compatibility.name && !compatibility.id">
|
||||||
|
{{compatibility.name}}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container
|
||||||
|
*ngIf="aggregationStatus && aggregationStatus.fulltexts && aggregationStatus.fulltexts > 0">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>OpenAIRE Text Mining</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="thematic">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>Thematic</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="provenanceAction">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{provenanceAction}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="relationName">
|
||||||
|
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
<span>{{relationName}}</span>
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
export class EntityMetadataComponent {
|
||||||
|
@Input() entityType: string;
|
||||||
|
@Input() types: string[];
|
||||||
|
@Input() year: string; // search result
|
||||||
|
@Input() startDate: number; // project landing
|
||||||
|
@Input() startYear: string; // search result
|
||||||
|
@Input() endDate: number; // project landing
|
||||||
|
@Input() endYear: string; // search result
|
||||||
|
@Input() currentDate: number; // project landing
|
||||||
|
@Input() status: string; // project landing
|
||||||
|
@Input() openAccessMandatePublications: boolean // project landing
|
||||||
|
@Input() openAccessMandateDatasets: boolean // project landing
|
||||||
|
@Input() date: Date;
|
||||||
|
@Input() embargoEndDate: Date | string;
|
||||||
|
@Input() underCuration: boolean = false;
|
||||||
|
@Input() publisher; // showPublisher component
|
||||||
|
@Input() journal; // showPublisher component
|
||||||
|
@Input() countries;
|
||||||
|
@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
|
||||||
|
@Input() provenanceAction: string; // search result
|
||||||
|
@Input() relationName: string; // search result
|
||||||
|
|
||||||
|
properties: EnvProperties = properties;
|
||||||
|
public openaireEntities = OpenaireEntities;
|
||||||
|
|
||||||
|
public removeUnknown(array: string[], type: boolean = false): string[] {
|
||||||
|
if (type) {
|
||||||
|
return this.removeDuplicates(array).filter(value => value.toLowerCase() !== 'unknown');
|
||||||
|
} else {
|
||||||
|
return array.filter(value => value.toLowerCase() !== 'unknown');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public removeDuplicates(array: string[]): string[] {
|
||||||
|
return array.filter(value => value.toLowerCase() !== this.entityType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public buildCurationTooltip(): string {
|
||||||
|
let tooltipContent: string = "<div class='uk-padding-small'>";
|
||||||
|
|
||||||
|
tooltipContent += "<h5>Record in preview</h5>";
|
||||||
|
tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>";
|
||||||
|
|
||||||
|
tooltipContent += "</div>";
|
||||||
|
return tooltipContent;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,6 @@ import {Component, Input} from "@angular/core";
|
||||||
import {EnvProperties} from "../../../utils/properties/env-properties";
|
import {EnvProperties} from "../../../utils/properties/env-properties";
|
||||||
import {Author} from "../../../utils/result-preview/result-preview";
|
import {Author} from "../../../utils/result-preview/result-preview";
|
||||||
import {AlertModal} from "../../../utils/modal/alert";
|
import {AlertModal} from "../../../utils/modal/alert";
|
||||||
import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchFields";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'landing-header',
|
selector: 'landing-header',
|
||||||
|
@ -14,140 +13,15 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF
|
||||||
<span class="uk-text-meta uk-text-small" [innerHTML]="subTitle"></span>
|
<span class="uk-text-meta uk-text-small" [innerHTML]="subTitle"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-bottom uk-text-xsmall uk-text-emphasis uk-flex uk-flex-middle uk-flex-wrap">
|
<div class="uk-margin-bottom">
|
||||||
<!-- oa -->
|
<entity-metadata [entityType]="entityType" [types]="types" [startDate]="startDate" [endDate]="endDate"
|
||||||
<ng-container
|
[currentDate]="currentDate" [status]="status" [openAccessMandatePublications]="openAccessMandatePublications"
|
||||||
*ngIf="(openAccessMandatePublications != undefined && openAccessMandatePublications) || (openAccessMandateDatasets != undefined && openAccessMandateDatasets)">
|
[openAccessMandateDatasets]="openAccessMandateDatasets" [date]="date" [embargoEndDate]="embargoEndDate"
|
||||||
<span class="uk-margin-xsmall-right open-access">
|
[underCuration]="underCuration" [publisher]="publisher" [journal]="journal"
|
||||||
<icon name="open_access" [flex]="true" [ratio]="0.8"></icon>
|
[languages]="languages" [programmingLanguages]="programmingLanguages"
|
||||||
</span>
|
[compatibility]="compatibility" [aggregationStatus]="aggregationStatus"
|
||||||
<span class="uk-text-bolder"
|
[thematic]="thematic" [type]="type"
|
||||||
*ngIf="openAccessMandatePublications != undefined && openAccessMandatePublications && openAccessMandateDatasets != undefined && openAccessMandateDatasets">
|
></entity-metadata>
|
||||||
Open Access Mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}
|
|
||||||
</span>
|
|
||||||
<span class="uk-text-bolder"
|
|
||||||
*ngIf="openAccessMandatePublications != undefined && openAccessMandatePublications && (openAccessMandateDatasets == undefined || !openAccessMandateDatasets)">
|
|
||||||
Open Access Mandate for {{openaireEntities.PUBLICATIONS}}
|
|
||||||
</span>
|
|
||||||
<span class="uk-text-bolder"
|
|
||||||
*ngIf="openAccessMandateDatasets != undefined && openAccessMandateDatasets && (openAccessMandatePublications == undefined || !openAccessMandatePublications)">
|
|
||||||
Open Access Mandate for {{openaireEntities.DATASETS}}
|
|
||||||
</span>
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
</ng-container>
|
|
||||||
<!-- types -->
|
|
||||||
<span *ngIf="entityType" class="uk-margin-xsmall-right">
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'publication'" name="description" type="outlined"
|
|
||||||
[flex]="true" [ratio]="0.8"></icon>
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'research data'" name="database" type="outlined"
|
|
||||||
[flex]="true" [ratio]="0.8"></icon>
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'research software'" name="integration_instructions"
|
|
||||||
type="outlined" [flex]="true" [ratio]="0.8"></icon>
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'other research product'" name="apps" type="outlined"
|
|
||||||
[flex]="true" [ratio]="0.8"></icon>
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'project'" name="assignment_turned_in" type="outlined"
|
|
||||||
[flex]="true" [ratio]="0.8"></icon>
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'data source'" name="note_add" type="outlined"
|
|
||||||
[flex]="true" [ratio]="0.8"></icon>
|
|
||||||
<icon *ngIf="entityType.toLowerCase() == 'organization'" name="corporate_fare" type="outlined"
|
|
||||||
[flex]="true" [ratio]="0.8"></icon>
|
|
||||||
</span>
|
|
||||||
<span *ngIf="entityType" class="uk-text-capitalize uk-text-bolder" style="text-decoration: underline;">
|
|
||||||
{{entityType}}
|
|
||||||
</span>
|
|
||||||
<span *ngIf="entityType && types && removeUnknown(types, true).length > 0">
|
|
||||||
<icon name="keyboard_double_arrow_right" [flex]="true" [ratio]="0.8"></icon>
|
|
||||||
</span>
|
|
||||||
<span *ngIf="types && removeUnknown(types, true).length > 0" class="uk-text-italic">
|
|
||||||
{{removeUnknown(types, true).join(' , ')}}
|
|
||||||
</span>
|
|
||||||
<!-- dates -->
|
|
||||||
<ng-container *ngIf="startDate && !endDate">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span class="uk-margin-xsmall-right">From</span>
|
|
||||||
<span>{{startDate | date: 'dd MMM yyyy'}}</span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="!startDate && endDate">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span class="uk-margin-xsmall-right">Until</span>
|
|
||||||
<span>{{endDate | date: 'dd MMM yyyy'}}</span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="startDate && endDate">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<ng-container *ngIf="startDate">
|
|
||||||
<span>{{startDate | date: 'dd MMM yyyy'}}</span>
|
|
||||||
<span class="uk-margin-xsmall-left">(Started)</span>
|
|
||||||
</ng-container>
|
|
||||||
<span *ngIf="startDate && endDate" class="uk-margin-xsmall-left uk-margin-xsmall-right">-</span>
|
|
||||||
<ng-container *ngIf="endDate">
|
|
||||||
<span>{{endDate | date: 'dd MMM yyyy'}}</span>
|
|
||||||
<span class="uk-margin-xsmall-left">{{currentDate >= endDate ? '(Ended)' : '(Ending)'}}</span>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="status && status != ''">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span>{{status}}</span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="date">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="embargoEndDate">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span>Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}}</span>
|
|
||||||
</ng-container>
|
|
||||||
<span *ngIf="underCuration">
|
|
||||||
. <span title="{{buildCurationTooltip()}}"
|
|
||||||
uk-tooltip="pos:bottom-right; delay:10;"
|
|
||||||
class="uk-text-primary">Under curation</span>
|
|
||||||
</span>
|
|
||||||
<!-- languages -->
|
|
||||||
<ng-container *ngIf="languages && removeUnknown(languages).length > 0">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<ng-container *ngFor="let language of removeUnknown(languages)">
|
|
||||||
<span>{{language}}</span>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container>
|
|
||||||
<!-- programming languages -->
|
|
||||||
<ng-container *ngIf="programmingLanguages && programmingLanguages.length > 0">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<ng-container *ngFor="let programmingLanguage of programmingLanguages">
|
|
||||||
<span>{{programmingLanguage}}</span>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container>
|
|
||||||
<!-- published info -->
|
|
||||||
<showPublisher [publisher]="publisher" [journal]="journal" [properties]="properties"></showPublisher>
|
|
||||||
<!-- data provider labels -->
|
|
||||||
<ng-container *ngIf="compatibility && !(compatibility.info == 'not available' && type == 'service')">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span title="Compatibility">
|
|
||||||
<a *ngIf="compatibility.id"
|
|
||||||
[queryParams]="{datasourceId: compatibility.id}" routerLinkActive="router-link-active"
|
|
||||||
[routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
|
||||||
{{compatibility.info}}
|
|
||||||
<ng-container *ngIf="compatibility.name">{{compatibility.name}}</ng-container>
|
|
||||||
</a>
|
|
||||||
<span *ngIf="!compatibility.id">
|
|
||||||
<ng-container
|
|
||||||
*ngIf="compatibility.info.toLowerCase() != 'not yet registered'">{{compatibility.info}}</ng-container>
|
|
||||||
<ng-container *ngIf="compatibility.info.toLowerCase() == 'not yet registered'">
|
|
||||||
{{compatibility.info}} <span *ngIf="properties.adminToolsPortalType == 'eosc'">in OpenAIRE</span>
|
|
||||||
</ng-container>
|
|
||||||
</span>
|
|
||||||
<span *ngIf="compatibility.name && !compatibility.id">
|
|
||||||
{{compatibility.name}}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container
|
|
||||||
*ngIf="aggregationStatus && aggregationStatus.fulltexts && aggregationStatus.fulltexts > 0">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span>OpenAIRE Text Mining</span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="thematic">
|
|
||||||
<span class="uk-margin-xsmall-left uk-margin-xsmall-right">•</span>
|
|
||||||
<span>Thematic</span>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="authors">
|
<div *ngIf="authors">
|
||||||
<showAuthors [authorsLimit]="authorLimit" [modal]="modal" [showAll]="showAllAuthors" [authors]="authors"
|
<showAuthors [authorsLimit]="authorLimit" [modal]="modal" [showAll]="showAllAuthors" [authors]="authors"
|
||||||
|
@ -176,7 +50,6 @@ export class LandingHeaderComponent {
|
||||||
@Input() underCuration: boolean = false;
|
@Input() underCuration: boolean = false;
|
||||||
@Input() modal: AlertModal;
|
@Input() modal: AlertModal;
|
||||||
@Input() titleClass: string = null;
|
@Input() titleClass: string = null;
|
||||||
@Input() isTitleH1: boolean = true;
|
|
||||||
@Input() isSticky: boolean = false;
|
@Input() isSticky: boolean = false;
|
||||||
@Input() publisher; // showPublisher component
|
@Input() publisher; // showPublisher component
|
||||||
@Input() journal; // showPublisher component
|
@Input() journal; // showPublisher component
|
||||||
|
@ -186,28 +59,4 @@ export class LandingHeaderComponent {
|
||||||
@Input() aggregationStatus; // data provider landing
|
@Input() aggregationStatus; // data provider landing
|
||||||
@Input() thematic: boolean; // data provider landing
|
@Input() thematic: boolean; // data provider landing
|
||||||
@Input() type; // data provider landing
|
@Input() type; // data provider landing
|
||||||
|
|
||||||
public openaireEntities = OpenaireEntities;
|
|
||||||
|
|
||||||
public removeUnknown(array: string[], type: boolean = false): string[] {
|
|
||||||
if (type) {
|
|
||||||
return this.removeDuplicates(array).filter(value => value.toLowerCase() !== 'unknown');
|
|
||||||
} else {
|
|
||||||
return array.filter(value => value.toLowerCase() !== 'unknown');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public removeDuplicates(array: string[]): string[] {
|
|
||||||
return array.filter(value => value.toLowerCase() !== this.entityType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public buildCurationTooltip(): string {
|
|
||||||
let tooltipContent: string = "<div class='uk-padding-small'>";
|
|
||||||
|
|
||||||
tooltipContent += "<h5>Record in preview</h5>";
|
|
||||||
tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>";
|
|
||||||
|
|
||||||
tooltipContent += "</div>";
|
|
||||||
return tooltipContent;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,10 @@ import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module";
|
||||||
import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module";
|
import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module";
|
||||||
import {ShowPublisherModule} from "../showPublisher.module";
|
import {ShowPublisherModule} from "../showPublisher.module";
|
||||||
import {RouterModule} from "@angular/router";
|
import {RouterModule} from "@angular/router";
|
||||||
|
import {ResultLandingUtilsModule} from "../resultLandingUtils.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule, RouterModule],
|
imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule, RouterModule, ResultLandingUtilsModule],
|
||||||
declarations: [LandingHeaderComponent],
|
declarations: [LandingHeaderComponent],
|
||||||
exports: [LandingHeaderComponent]
|
exports: [LandingHeaderComponent]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {HostedByCollectedFrom, Journal, Project, RelationResult} from "../../utils/result-preview/result-preview";
|
import {HostedByCollectedFrom, Project, RelationResult} from "../../utils/result-preview/result-preview";
|
||||||
import {Context, Measure, Reference} from "../../utils/entities/resultLandingInfo";
|
import {Context, Measure, Metric, Reference} from "../../utils/entities/resultLandingInfo";
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {StringUtils} from "../../utils/string-utils.class";
|
import {StringUtils} from "../../utils/string-utils.class";
|
||||||
|
@ -868,82 +868,88 @@ export class ParsingFunctions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parseMeasures(measures: any[]): Measure {
|
parseMeasures(elements: any[]): Measure {
|
||||||
if (measures && measures.length) {
|
if (elements && elements.length) {
|
||||||
let parsed: Measure = {
|
let bip: Metric[] = [];
|
||||||
"downloads": null,
|
let counts: Metric[] = [];
|
||||||
"views": null,
|
let measure: Measure = {};
|
||||||
"popularity": null,
|
elements.forEach(element => {
|
||||||
"influence": null,
|
if (element.id == 'views') {
|
||||||
"citations": null,
|
counts.push({name: 'views', icon: 'visibility', value: element.count, order: 0});
|
||||||
"impulse": null
|
measure.views = element.count;
|
||||||
};
|
|
||||||
measures.forEach(measure => {
|
|
||||||
if (measure.id == 'downloads') {
|
|
||||||
// parsed.downloads = measure.count == 0 ? ' - ' : measure.count;
|
|
||||||
parsed.downloads = measure.count;
|
|
||||||
}
|
}
|
||||||
if (measure.id == 'views') {
|
if (element.id == 'downloads') {
|
||||||
// parsed.views = measure.count == 0 ? ' - ' : measure.count;
|
counts.push({name: 'downloads', icon: 'download', value: element.count, order: 1});
|
||||||
parsed.views = measure.count;
|
measure.downloads = element.count;
|
||||||
}
|
}
|
||||||
if (measure.id == 'influence') {
|
if (element.id == 'influence_alt') {
|
||||||
if (measure.class == 'C1') {
|
bip.push({name: 'citations', icon: 'cite', value: element.score, order: 2});
|
||||||
parsed.influence = 'Top 0.01%';
|
measure.citations = element.score;
|
||||||
} else if (measure.class == 'C2') {
|
}
|
||||||
parsed.influence = 'Top 0.1%';
|
if (element.id == 'popularity') {
|
||||||
} else if (measure.class == 'C3') {
|
let metric: Metric = {name: 'popularity', icon: 'fire', value: null, order: 3};
|
||||||
parsed.influence = 'Top 1%';
|
if (element.class == 'C1') {
|
||||||
} else if (measure.class == 'C4') {
|
metric.value = 'Top 0.01%';
|
||||||
parsed.influence = 'Top 10%';
|
} else if (element.class == 'C2') {
|
||||||
} else if (measure.class == 'A') {
|
metric.value = 'Top 0.1%';
|
||||||
parsed.influence = 'Exceptional';
|
} else if (element.class == 'C3') {
|
||||||
} else if (measure.class == 'B') {
|
metric.value = 'Top 1%';
|
||||||
parsed.influence = 'Substantial';
|
} else if (element.class == 'C4') {
|
||||||
|
metric.value = 'Top 10%';
|
||||||
|
} else if (element.class == 'A') {
|
||||||
|
metric.value = 'Exceptional';
|
||||||
|
} else if (element.class == 'B') {
|
||||||
|
metric.value = 'Substantial';
|
||||||
} else {
|
} else {
|
||||||
parsed.influence = 'Average';
|
metric.value = 'Average';
|
||||||
}
|
}
|
||||||
|
measure.popularity = metric.value;
|
||||||
|
bip.push(metric);
|
||||||
}
|
}
|
||||||
if (measure.id == 'popularity') {
|
if (element.id == 'influence') {
|
||||||
if (measure.class == 'C1') {
|
let metric: Metric = {name: 'influence', icon: 'landmark', value: null, order: 4};
|
||||||
parsed.popularity = 'Top 0.01%';
|
if (element.class == 'C1') {
|
||||||
} else if (measure.class == 'C2') {
|
metric.value = 'Top 0.01%';
|
||||||
parsed.popularity = 'Top 0.1%';
|
} else if (element.class == 'C2') {
|
||||||
} else if (measure.class == 'C3') {
|
metric.value = 'Top 0.1%';
|
||||||
parsed.popularity = 'Top 1%';
|
} else if (element.class == 'C3') {
|
||||||
} else if (measure.class == 'C4') {
|
metric.value = 'Top 1%';
|
||||||
parsed.popularity = 'Top 10%';
|
} else if (element.class == 'C4') {
|
||||||
} else if (measure.class == 'A') {
|
metric.value = 'Top 10%';
|
||||||
parsed.popularity = 'Exceptional';
|
} else if (element.class == 'A') {
|
||||||
} else if (measure.class == 'B') {
|
metric.value = 'Exceptional';
|
||||||
parsed.popularity = 'Substantial';
|
} else if (element.class == 'B') {
|
||||||
|
metric.value = 'Substantial';
|
||||||
} else {
|
} else {
|
||||||
parsed.popularity = 'Average';
|
metric.value = 'Average';
|
||||||
}
|
}
|
||||||
|
measure.influence = metric.value;
|
||||||
|
bip.push(metric);
|
||||||
}
|
}
|
||||||
if (measure.id == 'influence_alt') {
|
if (element.id == 'impulse') {
|
||||||
// parsed['citations'] = measure.score == 0 ? ' - ' : measure.score;
|
let metric: Metric = {name: 'impulse', icon: 'rocket', value: null, order: 5};
|
||||||
parsed.citations = measure.score;
|
if (element.class == 'C1') {
|
||||||
}
|
metric.value = 'Top 0.01%';
|
||||||
if (measure.id == 'impulse') {
|
} else if (element.class == 'C2') {
|
||||||
if (measure.class == 'C1') {
|
metric.value = 'Top 0.1%';
|
||||||
parsed.impulse = 'Top 0.01%';
|
} else if (element.class == 'C3') {
|
||||||
} else if (measure.class == 'C2') {
|
metric.value = 'Top 1%';
|
||||||
parsed.impulse = 'Top 0.1%';
|
} else if (element.class == 'C4') {
|
||||||
} else if (measure.class == 'C3') {
|
metric.value = 'Top 10%';
|
||||||
parsed.impulse = 'Top 1%';
|
} else if (element.class == 'A') {
|
||||||
} else if (measure.class == 'C4') {
|
metric.value = 'Exceptional';
|
||||||
parsed.impulse = 'Top 10%';
|
} else if (element.class == 'B') {
|
||||||
} else if (measure.class == 'A') {
|
metric.value = 'Substantial';
|
||||||
parsed.impulse = 'Exceptional';
|
|
||||||
} else if (measure.class == 'B') {
|
|
||||||
parsed.impulse = 'Substantial';
|
|
||||||
} else {
|
} else {
|
||||||
parsed.impulse = 'Average';
|
metric.value = 'Average';
|
||||||
}
|
}
|
||||||
|
measure.impulse = metric.value;
|
||||||
|
bip.push(metric);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return parsed;
|
measure.bip = bip.sort((a, b) => a.order - b.order);
|
||||||
|
measure.counts = counts.sort((a, b) => a.order - b.order);
|
||||||
|
return measure;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@ import {SdgComponent} from "./sdg.component";
|
||||||
import {IconsModule} from "../../utils/icons/icons.module";
|
import {IconsModule} from "../../utils/icons/icons.module";
|
||||||
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||||
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
|
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
|
||||||
|
import {EntityMetadataComponent} from "./entity-metadata.component";
|
||||||
|
import {IconsService} from "../../utils/icons/icons.service";
|
||||||
|
import {closed_access, open_access} from "../../utils/icons/icons";
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -27,7 +30,8 @@ import { SearchInputModule } from '../../sharedComponents/search-input/search-in
|
||||||
declarations: [
|
declarations: [
|
||||||
ShowIdentifiersComponent,ShowSubjectsComponent,
|
ShowIdentifiersComponent,ShowSubjectsComponent,
|
||||||
FundedByComponent,AvailableOnComponent,TabTableComponent,
|
FundedByComponent,AvailableOnComponent,TabTableComponent,
|
||||||
RelatedToComponent, FosComponent, SdgComponent
|
RelatedToComponent, FosComponent, SdgComponent,
|
||||||
|
EntityMetadataComponent
|
||||||
],
|
],
|
||||||
providers:[
|
providers:[
|
||||||
],
|
],
|
||||||
|
@ -37,4 +41,8 @@ import { SearchInputModule } from '../../sharedComponents/search-input/search-in
|
||||||
RelatedToComponent, FosComponent, SdgComponent
|
RelatedToComponent, FosComponent, SdgComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ResultLandingUtilsModule { }
|
export class ResultLandingUtilsModule {
|
||||||
|
constructor(private iconsService: IconsService) {
|
||||||
|
this.iconsService.registerIcons([open_access, closed_access]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ import {MatFormFieldModule} from "@angular/material/form-field";
|
||||||
import {MatSelectModule} from "@angular/material/select";
|
import {MatSelectModule} from "@angular/material/select";
|
||||||
import {IconsModule} from "../../utils/icons/icons.module";
|
import {IconsModule} from "../../utils/icons/icons.module";
|
||||||
import {IconsService} from "../../utils/icons/icons.service";
|
import {IconsService} from "../../utils/icons/icons.service";
|
||||||
import {graph, link, quotes, cite, link_to, versions, rocket, fire, landmark, open_access, closed_access} from "../../utils/icons/icons";
|
import {cite, fire, graph, landmark, link, link_to, quotes, rocket, versions} from "../../utils/icons/icons";
|
||||||
import {InputModule} from "../../sharedComponents/input/input.module";
|
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||||
import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module";
|
import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module";
|
||||||
import {RecaptchaModule} from 'ng-recaptcha';
|
import {RecaptchaModule} from 'ng-recaptcha';
|
||||||
|
@ -61,6 +61,6 @@ import {SdgFosSuggestModule} from '../landing-utils/sdg-fos-suggest/sdg-fos-sugg
|
||||||
})
|
})
|
||||||
export class ResultLandingModule {
|
export class ResultLandingModule {
|
||||||
constructor(private iconsService: IconsService) {
|
constructor(private iconsService: IconsService) {
|
||||||
this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions, rocket, fire, landmark, open_access, closed_access])
|
this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions, rocket, fire, landmark])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,7 +330,7 @@ export class ResultLandingService {
|
||||||
|
|
||||||
this.resultLandingInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
|
this.resultLandingInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
|
||||||
this.resultLandingInfo.hostedBy_collectedFrom, this.resultLandingInfo.publisher,
|
this.resultLandingInfo.hostedBy_collectedFrom, this.resultLandingInfo.publisher,
|
||||||
this.resultLandingInfo.journal.journal, this.resultLandingInfo.identifiers);
|
this.resultLandingInfo.journal?.journal, this.resultLandingInfo.identifiers);
|
||||||
|
|
||||||
// res['result']['metadata']['oaf:entity']['oaf:result']['programmingLanguage']
|
// res['result']['metadata']['oaf:entity']['oaf:result']['programmingLanguage']
|
||||||
if (data[12] != null) {
|
if (data[12] != null) {
|
||||||
|
|
|
@ -17,50 +17,18 @@ declare var UIkit: any;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'orcid-work',
|
selector: 'orcid-work',
|
||||||
template: `
|
template: `
|
||||||
<ng-container *ngIf="pageType == 'search'">
|
<ng-container *ngIf="pageType == 'landing' || pageType == 'search'">
|
||||||
<span *ngIf="!putCodes || putCodes.length == 0"
|
|
||||||
[attr.uk-tooltip]="(!isLoggedIn) ? tooltipNoLoggedInUser : tooltipAdd"
|
|
||||||
class="uk-margin-remove-bottom">
|
|
||||||
|
|
||||||
<a (click)="currentAction='add'; saveWorkPreparation();"
|
|
||||||
[class]="'uk-button uk-button-link uk-flex uk-flex-middle uk-flex-right@s uk-margin-right '+ ((showLoading || !isLoggedIn) ? 'uk-disabled ' : '') + (!isLoggedIn ? 'half-opacity' : '')">
|
|
||||||
<icon *ngIf="!showLoading" name="add" ratio="1" flex="true"></icon>
|
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false" [size]="'small'"></loading></span>
|
|
||||||
<span class="uk-margin-small-left uk-flex uk-flex-middle">Add to 
|
|
||||||
<span class="uk-flex uk-flex-middle">
|
|
||||||
<span>ORCID </span>
|
|
||||||
<img class="" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="orcid" style="width:16px; height:16px" loading="lazy"> 
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span *ngIf="putCodes && putCodes.length > 0"
|
|
||||||
[attr.uk-tooltip]="(!isLoggedIn) ? tooltipNoLoggedInUser : tooltipDelete"
|
|
||||||
class="uk-margin-remove-bottom">
|
|
||||||
<a (click)="currentAction='delete'; deleteWorks();"
|
|
||||||
[class]="'uk-button uk-button-link uk-flex uk-flex-middle uk-flex-right@s uk-margin-right '+ (showLoading ? 'uk-disabled' : '')">
|
|
||||||
<icon *ngIf="!showLoading" name="delete" ratio="0.8" flex="true"></icon>
|
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false" [size]="'small'"></loading></span>
|
|
||||||
<span class="uk-margin-small-left uk-flex uk-flex-middle">Delete from 
|
|
||||||
<span class="uk-flex uk-flex-middle">
|
|
||||||
<span>ORCID </span>
|
|
||||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="" loading="lazy"> 
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container *ngIf="pageType == 'landing'">
|
|
||||||
<span *ngIf="!putCodes || putCodes.length == 0"
|
<span *ngIf="!putCodes || putCodes.length == 0"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
|
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
|
||||||
<a *ngIf="!showLoading" (click)="currentAction='add'; saveWorkPreparation();"
|
<a *ngIf="!showLoading" (click)="currentAction='add'; saveWorkPreparation();"
|
||||||
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder landing-action-button-orcid"
|
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder"
|
||||||
[class.uk-disabled]="showLoading || !isLoggedIn || !pids"
|
[class.uk-disabled]="showLoading || !isLoggedIn || !pids"
|
||||||
|
[class.uk-text-muted]="showLoading || !isLoggedIn || !pids"
|
||||||
(mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)">
|
(mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)">
|
||||||
<icon name="orcid_add" ratio="1" visuallyHidden="add"></icon>
|
<icon [class.text-orcid]="!showLoading && isLoggedIn && pids"
|
||||||
|
[class.uk-text-muted]="showLoading || !isLoggedIn || !pids" name="orcid_add" ratio="1"
|
||||||
|
visuallyHidden="add"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Claim</span>
|
<span class="uk-margin-xsmall-left">Claim</span>
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button uk-icon-button-small"><loading
|
<span *ngIf="showLoading" class="uk-icon icon-button uk-icon-button-small"><loading
|
||||||
|
@ -71,10 +39,13 @@ declare var UIkit: any;
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
|
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
|
||||||
<a *ngIf="!showLoading" (click)="currentAction='delete'; deleteWorks();"
|
<a *ngIf="!showLoading" (click)="currentAction='delete'; deleteWorks();"
|
||||||
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder landing-action-button-orcid"
|
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder"
|
||||||
[class.uk-disabled]="showLoading || !isLoggedIn || !pids"
|
[class.uk-disabled]="showLoading || !isLoggedIn || !pids"
|
||||||
|
[class.uk-text-muted]="showLoading || !isLoggedIn || !pids"
|
||||||
(mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')">
|
(mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')">
|
||||||
<icon name="orcid_bin" ratio="1" visuallyHidden="delete"></icon>
|
<icon [class.text-orcid]="!showLoading && isLoggedIn && pids"
|
||||||
|
[class.uk-text-muted]="showLoading || !isLoggedIn || !pids" name="orcid_bin" ratio="1"
|
||||||
|
visuallyHidden="delete"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Remove</span>
|
<span class="uk-margin-xsmall-left">Remove</span>
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button uk-icon-button-small"><loading
|
<span *ngIf="showLoading" class="uk-icon icon-button uk-icon-button-small"><loading
|
||||||
|
@ -136,7 +107,8 @@ declare var UIkit: any;
|
||||||
[class]="'uk-button uk-button-default action uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')">
|
[class]="'uk-button uk-button-default action uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')">
|
||||||
<icon *ngIf="!showLoading || currentAction!='get'" name="visibility" ratio="1" flex="true"></icon>
|
<icon *ngIf="!showLoading || currentAction!='get'" name="visibility" ratio="1" flex="true"></icon>
|
||||||
|
|
||||||
<span *ngIf="showLoading && currentAction=='get'" class="uk-icon icon-button"><loading [top_margin]="false" [size]="'small'"></loading></span>
|
<span *ngIf="showLoading && currentAction=='get'" class="uk-icon icon-button"><loading [top_margin]="false"
|
||||||
|
[size]="'small'"></loading></span>
|
||||||
<span class="uk-margin-small-left">View ORCID work</span>
|
<span class="uk-margin-small-left">View ORCID work</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -148,7 +120,8 @@ declare var UIkit: any;
|
||||||
<a (click)="currentAction='update'; updateWorkPreparation()"
|
<a (click)="currentAction='update'; updateWorkPreparation()"
|
||||||
[class]="'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')">
|
[class]="'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')">
|
||||||
<icon *ngIf="!showLoading || currentAction!='update'" name="refresh" ratio="1" flex="true"></icon>
|
<icon *ngIf="!showLoading || currentAction!='update'" name="refresh" ratio="1" flex="true"></icon>
|
||||||
<span *ngIf="showLoading && currentAction=='update'" class="uk-icon icon-button"><loading [top_margin]="false" [size]="'small'"></loading></span>
|
<span *ngIf="showLoading && currentAction=='update'" class="uk-icon icon-button"><loading [top_margin]="false"
|
||||||
|
[size]="'small'"></loading></span>
|
||||||
<span class="uk-margin-small-left">Update ORCID work</span>
|
<span class="uk-margin-small-left">Update ORCID work</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -158,7 +131,8 @@ declare var UIkit: any;
|
||||||
<a (click)="currentAction='add'; saveWorkPreparation();"
|
<a (click)="currentAction='add'; saveWorkPreparation();"
|
||||||
[class]="'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ (showLoading ? 'uk-disabled' : '')">
|
[class]="'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ (showLoading ? 'uk-disabled' : '')">
|
||||||
<icon *ngIf="!showLoading || currentAction!='add'" name="add" ratio="1" flex="true"></icon>
|
<icon *ngIf="!showLoading || currentAction!='add'" name="add" ratio="1" flex="true"></icon>
|
||||||
<span *ngIf="showLoading && currentAction=='add'" class="uk-icon icon-button"><loading [top_margin]="false" [size]="'small'"></loading></span>
|
<span *ngIf="showLoading && currentAction=='add'" class="uk-icon icon-button"><loading [top_margin]="false"
|
||||||
|
[size]="'small'"></loading></span>
|
||||||
<span class="uk-margin-small-left">Add to ORCID</span>
|
<span class="uk-margin-small-left">Add to ORCID</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -168,7 +142,8 @@ declare var UIkit: any;
|
||||||
<a (click)="currentAction='delete'; deleteWorks();"
|
<a (click)="currentAction='delete'; deleteWorks();"
|
||||||
[class]="'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ (showLoading ? 'uk-disabled' : '')">
|
[class]="'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ (showLoading ? 'uk-disabled' : '')">
|
||||||
<icon *ngIf="!showLoading || currentAction!='delete'" name="delete" ratio="1" flex="true"></icon>
|
<icon *ngIf="!showLoading || currentAction!='delete'" name="delete" ratio="1" flex="true"></icon>
|
||||||
<span *ngIf="showLoading && currentAction=='delete'" class="uk-icon icon-button"><loading [top_margin]="false" [size]="'small'"></loading></span>
|
<span *ngIf="showLoading && currentAction=='delete'" class="uk-icon icon-button"><loading [top_margin]="false"
|
||||||
|
[size]="'small'"></loading></span>
|
||||||
<span class="uk-margin-small-left">Delete from ORCID</span>
|
<span class="uk-margin-small-left">Delete from ORCID</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -243,14 +218,16 @@ declare var UIkit: any;
|
||||||
)">
|
)">
|
||||||
(
|
(
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-role']">
|
<span
|
||||||
|
*ngIf="contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-role']">
|
||||||
{{contributor['contributor-attributes']['contributor-role']}}
|
{{contributor['contributor-attributes']['contributor-role']}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="(contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-role'])
|
<span *ngIf="(contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-role'])
|
||||||
&& (contributor['contributor-attributes']['contributor-sequence'] || (contributor['contributor-orcid'] && contributor['contributor-orcid']['path']))">
|
&& (contributor['contributor-attributes']['contributor-sequence'] || (contributor['contributor-orcid'] && contributor['contributor-orcid']['path']))">
|
||||||
,
|
,
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-sequence']">
|
<span
|
||||||
|
*ngIf="contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-sequence']">
|
||||||
{{contributor['contributor-attributes']['contributor-sequence']}}
|
{{contributor['contributor-attributes']['contributor-sequence']}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-sequence']
|
<span *ngIf="contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-sequence']
|
||||||
|
@ -276,14 +253,17 @@ declare var UIkit: any;
|
||||||
|
|
||||||
<modal-alert #propagationModal (alertOutput)="confirmedPropagation()">
|
<modal-alert #propagationModal (alertOutput)="confirmedPropagation()">
|
||||||
<div>
|
<div>
|
||||||
This {{openaireEntities.RESULT}} is the result of <span class="uk-text-bold"> merged {{openaireEntities.RESULTS}} in OpenAIRE</span>.
|
This {{openaireEntities.RESULT}} is the result of <span
|
||||||
|
class="uk-text-bold"> merged {{openaireEntities.RESULTS}} in OpenAIRE</span>.
|
||||||
<br><br>
|
<br><br>
|
||||||
You have already added <span class="uk-text-bold">{{this.putCodes?.length}} works</span> in your ORCID record related to the merged {{openaireEntities.RESULT}}.
|
You have already added <span class="uk-text-bold">{{this.putCodes?.length}} works</span> in your ORCID record
|
||||||
|
related to the merged {{openaireEntities.RESULT}}.
|
||||||
<div *ngIf="currentAction == 'delete'">
|
<div *ngIf="currentAction == 'delete'">
|
||||||
If you continue with delete action, <span class="uk-text-bold">all these works will be deleted</span>.
|
If you continue with delete action, <span class="uk-text-bold">all these works will be deleted</span>.
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="currentAction == 'update'">
|
<div *ngIf="currentAction == 'update'">
|
||||||
If you continue with update action, <span class="uk-text-bold">all these works will be deleted and a new merged work will be added</span> instead.
|
If you continue with update action, <span class="uk-text-bold">all these works will be deleted and a new merged work will be added</span>
|
||||||
|
instead.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -412,7 +392,12 @@ export class OrcidWorkComponent {
|
||||||
openGrantWindow() {
|
openGrantWindow() {
|
||||||
if (!Session.isLoggedIn()) {
|
if (!Session.isLoggedIn()) {
|
||||||
//this.userValidMessage = "User session has expired. Please login again.";
|
//this.userValidMessage = "User session has expired. Please login again.";
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], {
|
||||||
|
queryParams: {
|
||||||
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
"redirectUrl": this._router.url
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// this.tokenUrl = location.origin+"/orcid";
|
// this.tokenUrl = location.origin+"/orcid";
|
||||||
this.window = window.open(this.tokenUrl, '_blank',
|
this.window = window.open(this.tokenUrl, '_blank',
|
||||||
|
@ -479,7 +464,12 @@ export class OrcidWorkComponent {
|
||||||
public saveWorkPreparation() {
|
public saveWorkPreparation() {
|
||||||
if (!Session.isLoggedIn()) {
|
if (!Session.isLoggedIn()) {
|
||||||
//this.userValidMessage = "User session has expired. Please login again.";
|
//this.userValidMessage = "User session has expired. Please login again.";
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], {
|
||||||
|
queryParams: {
|
||||||
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
"redirectUrl": this._router.url
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (this.requestGrant) {
|
if (this.requestGrant) {
|
||||||
|
@ -547,7 +537,12 @@ export class OrcidWorkComponent {
|
||||||
|
|
||||||
private updateWorkPreparation() {
|
private updateWorkPreparation() {
|
||||||
if (!Session.isLoggedIn()) {
|
if (!Session.isLoggedIn()) {
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], {
|
||||||
|
queryParams: {
|
||||||
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
"redirectUrl": this._router.url
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (this.requestGrant) {
|
if (this.requestGrant) {
|
||||||
|
@ -604,7 +599,12 @@ export class OrcidWorkComponent {
|
||||||
|
|
||||||
public getOrcidWorks() {
|
public getOrcidWorks() {
|
||||||
if (!Session.isLoggedIn()) {
|
if (!Session.isLoggedIn()) {
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], {
|
||||||
|
queryParams: {
|
||||||
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
"redirectUrl": this._router.url
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this.orcidService.getOrcidWorks(this.putCodes).subscribe(
|
this.subscriptions.push(this.orcidService.getOrcidWorks(this.putCodes).subscribe(
|
||||||
|
@ -641,7 +641,12 @@ export class OrcidWorkComponent {
|
||||||
|
|
||||||
public deleteWorks(confirmed: boolean = false) {
|
public deleteWorks(confirmed: boolean = false) {
|
||||||
if (!Session.isLoggedIn()) {
|
if (!Session.isLoggedIn()) {
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], {
|
||||||
|
queryParams: {
|
||||||
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
"redirectUrl": this._router.url
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (this.requestGrant) {
|
if (this.requestGrant) {
|
||||||
|
|
|
@ -252,9 +252,10 @@
|
||||||
[href]="openaireLink+this.routerHelper.createQueryParamsString(this.parameterNames, this.parameterValues)"
|
[href]="openaireLink+this.routerHelper.createQueryParamsString(this.parameterNames, this.parameterValues)"
|
||||||
target="_blank"> OpenAIRE - Explore</a>.
|
target="_blank"> OpenAIRE - Explore</a>.
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-flex uk-flex-between uk-flex-middle uk-flex-wrap">
|
<div class="uk-flex uk-flex-middle uk-flex-wrap" [class.uk-flex-between]="!mobile"
|
||||||
|
[class.uk-margin-top]="mobile" [class.uk-flex-center]="mobile">
|
||||||
<!-- Total results, number of pages -->
|
<!-- Total results, number of pages -->
|
||||||
<h6 class="uk-margin-remove">
|
<div class="uk-margin-remove" [class.uk-h6]="!mobile">
|
||||||
<ng-container *ngIf="results && searchUtils.totalResults > 0">
|
<ng-container *ngIf="results && searchUtils.totalResults > 0">
|
||||||
<span>{{searchUtils.totalResults|number}}</span>
|
<span>{{searchUtils.totalResults|number}}</span>
|
||||||
<span class="uk-text-meta uk-text-capitalize"> {{type}}, page </span>
|
<span class="uk-text-meta uk-text-capitalize"> {{type}}, page </span>
|
||||||
|
@ -267,9 +268,10 @@
|
||||||
<span>{{searchUtils.page | number}}</span>
|
<span>{{searchUtils.page | number}}</span>
|
||||||
<span class="uk-text-meta"> of {{(totalPages(oldTotalResults)|number)}}</span>
|
<span class="uk-text-meta"> of {{(totalPages(oldTotalResults)|number)}}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</h6>
|
</div>
|
||||||
<!-- Download results -->
|
<!-- Download results -->
|
||||||
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)" class="uk-margin-small-bottom uk-margin-small-top">
|
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||||
|
class="uk-margin-small-bottom uk-margin-small-top" [class.uk-margin-medium-top]="mobile">
|
||||||
<search-download
|
<search-download
|
||||||
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
||||||
[isDisabled]="disabled"
|
[isDisabled]="disabled"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<ul class="uk-list uk-list-xlarge uk-margin" [ngClass]="custom_class">
|
<ul class="uk-list uk-list-large uk-margin" [class.uk-list-xlarge]="!isMobile" [ngClass]="custom_class">
|
||||||
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
||||||
<li *ngFor="let result of previewResults" [class.uk-border-bottom]="!isMobile">
|
<li *ngFor="let result of previewResults" [class.uk-border-bottom]="!isMobile">
|
||||||
<result-preview [properties]="properties" [showOrganizations]="showOrganizations"
|
<result-preview [properties]="properties" [showOrganizations]="showOrganizations"
|
||||||
|
|
|
@ -30,12 +30,27 @@ export interface Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Measure {
|
export interface Measure {
|
||||||
downloads: string;
|
/** @deprecated*/
|
||||||
views: string;
|
downloads?: string;
|
||||||
influence: string;
|
/** @deprecated*/
|
||||||
popularity: string;
|
views?: string;
|
||||||
citations: string;
|
/** @deprecated*/
|
||||||
impulse: string;
|
influence?: string;
|
||||||
|
/** @deprecated*/
|
||||||
|
popularity?: string;
|
||||||
|
/** @deprecated*/
|
||||||
|
citations?: string;
|
||||||
|
/** @deprecated*/
|
||||||
|
impulse?: string;
|
||||||
|
bip?: Metric[]
|
||||||
|
counts?: Metric[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Metric {
|
||||||
|
name: string,
|
||||||
|
order: number,
|
||||||
|
icon: string,
|
||||||
|
value: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ResultLandingInfo {
|
export class ResultLandingInfo {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Author, HostedByCollectedFrom, Organization, Project, ResultTitle} from "../result-preview/result-preview";
|
import {Author, HostedByCollectedFrom, Organization, Project, ResultTitle} from "../result-preview/result-preview";
|
||||||
import {Measure} from "./resultLandingInfo";
|
import {Measure, Metric} from "./resultLandingInfo";
|
||||||
|
|
||||||
export class SearchResult {
|
export class SearchResult {
|
||||||
title: ResultTitle;
|
title: ResultTitle;
|
||||||
|
|
|
@ -15,15 +15,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-expand">
|
<div class="uk-width-expand">
|
||||||
<!-- 1st section (title, subtitle and deposit link) -->
|
<!-- 1st section (title, metadata) -->
|
||||||
<div class="uk-margin-bottom">
|
<div class="uk-margin-small-bottom">
|
||||||
<!-- Deposit searchPage URL -->
|
|
||||||
<!-- <span class="uk-width-expand uk-flex-right">
|
|
||||||
<a *ngIf="result.websiteURL && promoteWebsiteURL" href="{{result.websiteURL}}" target="_blank" type="submit"
|
|
||||||
class=" uk-float-right uk-button uk-button-primary uk-padding uk-padding-remove-vertical uk-margin-small-left">
|
|
||||||
<span><span>Visit repository to deposit</span><span uk-icon="arrow-right"></span></span>
|
|
||||||
</a>
|
|
||||||
</span> -->
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div>
|
<div>
|
||||||
<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">
|
||||||
|
@ -69,25 +62,22 @@
|
||||||
[no title available]
|
[no title available]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <hr class="uk-margin-remove-bottom" *ngIf="result.websiteURL && promoteWebsiteURL"> -->
|
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<!-- Small subtitle above title -->
|
<!-- Metadata -->
|
||||||
<div class="uk-text-small uk-margin-xsmall-bottom">
|
<div class="uk-margin-xsmall-top">
|
||||||
<span *ngIf="type" class="uk-text-capitalize type">{{type}}</span>
|
<entity-metadata [entityType]="type" [types]="result.types" [startYear]="result.startYear?.toString()" [endYear]="result.endYear?.toString()"
|
||||||
<span *ngIf="type && beforeTitle.length > 0"> . </span>
|
[year]="result.year?.toString()" [openAccessMandatePublications]="result.openAccessMandatePublications"
|
||||||
<span *ngIf="beforeTitle.length > 0" class="uk-text-capitalize">
|
[openAccessMandateDatasets]="result.openAccessMandateDatasets" [date]="" [embargoEndDate]="result.embargoEndDate"
|
||||||
{{beforeTitle.join(' . ')}}
|
[publisher]="result.publisher" [countries]="result.countries"
|
||||||
</span>
|
[languages]="result.languages" [programmingLanguages]="result.programmingLanguages"
|
||||||
<span *ngIf="result.embargoEndDate && result.embargoEndDate != ''">
|
[compatibility]="result.compatibility" [type]="type"
|
||||||
<span
|
></entity-metadata>
|
||||||
*ngIf="beforeTitle.length > 0"> . </span> Embargo End Date: {{result.embargoEndDate | date: 'dd MMM yyyy'}}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 2nd section (labels only) -->
|
<!-- 2nd section (labels only) -->
|
||||||
<div class="uk-margin-bottom">
|
<!--<div class="uk-margin-bottom">
|
||||||
<!-- Labels -->
|
<!– Labels –>
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
*ngIf="result.accessMode && result.accessMode.toLowerCase() !== 'not available'"
|
*ngIf="result.accessMode && result.accessMode.toLowerCase() !== 'not available'"
|
||||||
|
@ -127,10 +117,10 @@
|
||||||
{{programmingLanguage}}
|
{{programmingLanguage}}
|
||||||
</span>{{" "}}
|
</span>{{" "}}
|
||||||
</span>
|
</span>
|
||||||
<!-- <span -->
|
<!– <span –>
|
||||||
<!-- *ngIf="result.sc39" class="uk-label" title="Special Clause 39">-->
|
<!– *ngIf="result.sc39" class="uk-label" title="Special Clause 39">–>
|
||||||
<!-- Special Clause 39-->
|
<!– Special Clause 39–>
|
||||||
<!-- </span>{{' '}}-->
|
<!– </span>{{' '}}–>
|
||||||
<span
|
<span
|
||||||
*ngIf="result.compatibility && result.compatibility != '' && result.compatibility.toLowerCase() != 'not yet registered'"
|
*ngIf="result.compatibility && result.compatibility != '' && result.compatibility.toLowerCase() != 'not yet registered'"
|
||||||
class="uk-label" title="Compatibility">
|
class="uk-label" title="Compatibility">
|
||||||
|
@ -143,11 +133,11 @@
|
||||||
{{result.compatibility}} <span *ngIf="properties.adminToolsPortalType == 'eosc'">in OpenAIRE</span>
|
{{result.compatibility}} <span *ngIf="properties.adminToolsPortalType == 'eosc'">in OpenAIRE</span>
|
||||||
</span>{{' '}}
|
</span>{{' '}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<!-- 3rd section (funders, budget, authors, PIDs, publisher etc.) -->
|
<!-- 3rd section (funders, budget, authors, PIDs, publisher etc.) -->
|
||||||
<div class="section3 uk-text-small uk-margin-bottom">
|
<div class="uk-text-small uk-margin-small-bottom">
|
||||||
<!-- Funder -->
|
<!-- Funder -->
|
||||||
<div *ngIf="result.funderShortname || result.code" class="uk-margin-small-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}}
|
||||||
|
@ -163,7 +153,7 @@
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
</div>
|
</div>
|
||||||
<!-- Funder Budget -->
|
<!-- Funder Budget -->
|
||||||
<div *ngIf="result.budget || result.contribution" class="uk-margin-small-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}}
|
||||||
|
@ -176,31 +166,16 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- Authors -->
|
<!-- Authors -->
|
||||||
<div *ngIf="result.authors" class="uk-flex uk-margin-small-bottom">
|
<div *ngIf="result.authors" class="uk-flex uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">Authors: </span>
|
|
||||||
<showAuthors [authors]="result.authors" [authorsLimit]=10 [modal]="modal"
|
<showAuthors [authors]="result.authors" [authorsLimit]=10 [modal]="modal"
|
||||||
[showAll]=false></showAuthors>
|
[showAll]=false></showAuthors>
|
||||||
</div>
|
</div>
|
||||||
<!-- Identifiers -->
|
<!-- Identifiers -->
|
||||||
<div *ngIf="result.identifiers && result.identifiers.size > 0" class="uk-margin-small-bottom">
|
<div *ngIf="result.identifiers && result.identifiers.size > 0" class="uk-margin-xsmall-bottom">
|
||||||
<showIdentifiers [identifiers]="result.identifiers"></showIdentifiers>
|
<showIdentifiers [identifiers]="result.identifiers"></showIdentifiers>
|
||||||
</div>
|
</div>
|
||||||
<!-- Publisher -->
|
|
||||||
<div *ngIf="result.publisher && result.publisher != ''" class="uk-margin-small-bottom">
|
|
||||||
<span class="uk-text-meta">Publisher: </span>
|
|
||||||
{{result.publisher}}
|
|
||||||
</div>
|
|
||||||
<!-- Countries -->
|
|
||||||
<div *ngIf="result.countries && result.countries.length > 0"
|
|
||||||
class="uk-margin-small-bottom">
|
|
||||||
<span class="uk-text-meta">{{(result.countries.length == 1) ? 'Country' : 'Countries'}}: </span>
|
|
||||||
<span *ngFor="let country of result.countries.slice(0,10) let i = index">
|
|
||||||
{{country}}{{(i < (result.countries.slice(0, 10).length - 1)) ? ", " : ""}}
|
|
||||||
{{(i == result.countries.slice(0, 10).length - 1 && result.countries.length > 10) ? "..." : ""}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<!-- Projects -->
|
<!-- Projects -->
|
||||||
<div *ngIf="result.projects && result.projects.length > 0" class="uk-margin-small-bottom">
|
<div *ngIf="result.projects && result.projects.length > 0" class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta"> Project: </span>
|
<span class="uk-text-meta"> Project: </span>
|
||||||
<span *ngFor="let project of result.projects.slice(0,10) let i=index">
|
<span *ngFor="let project of result.projects.slice(0,10) let i=index">
|
||||||
<span>
|
<span>
|
||||||
|
@ -217,7 +192,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Organizations -->
|
<!-- Organizations -->
|
||||||
<div *ngIf="showOrganizations && result.organizations && result.organizations.length > 0"
|
<div *ngIf="showOrganizations && result.organizations && result.organizations.length > 0"
|
||||||
class="uk-margin-small-bottom">
|
class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">Partners: </span>
|
<span class="uk-text-meta">Partners: </span>
|
||||||
<span *ngFor="let organization of result.organizations.slice(0,10) let i=index">
|
<span *ngFor="let organization of result.organizations.slice(0,10) let i=index">
|
||||||
<span>{{organization.name}}</span>
|
<span>{{organization.name}}</span>
|
||||||
|
@ -227,7 +202,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Website URL -->
|
<!-- Website URL -->
|
||||||
<div *ngIf="result.websiteURL && result.websiteURL != '' && !promoteWebsiteURL"
|
<div *ngIf="result.websiteURL && result.websiteURL != '' && !promoteWebsiteURL"
|
||||||
class="uk-margin-small-bottom">
|
class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">Website URL: </span>
|
<span class="uk-text-meta">Website URL: </span>
|
||||||
<span>
|
<span>
|
||||||
<a href="{{result.websiteURL}}" target="_blank" class="custom-external">
|
<a href="{{result.websiteURL}}" target="_blank" class="custom-external">
|
||||||
|
@ -236,7 +211,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- OAI-PMH URL-->
|
<!-- OAI-PMH URL-->
|
||||||
<div *ngIf="result.OAIPMHURL && result.OAIPMHURL != ''" class="uk-margin-small-bottom">
|
<div *ngIf="result.OAIPMHURL && result.OAIPMHURL != ''" class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">OAI-PMH URL: </span>
|
<span class="uk-text-meta">OAI-PMH URL: </span>
|
||||||
<span>
|
<span>
|
||||||
<a href="{{result.OAIPMHURL}}" target="_blank" class="custom-external">
|
<a href="{{result.OAIPMHURL}}" target="_blank" class="custom-external">
|
||||||
|
@ -246,7 +221,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Subjects -->
|
<!-- Subjects -->
|
||||||
<div *ngIf="showSubjects && result.subjects && result.subjects.length > 0"
|
<div *ngIf="showSubjects && result.subjects && result.subjects.length > 0"
|
||||||
class="uk-margin-small-bottom">
|
class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">Subject: </span>
|
<span class="uk-text-meta">Subject: </span>
|
||||||
<span *ngFor="let subject of result.subjects.slice(0,10) let i = index">
|
<span *ngFor="let subject of result.subjects.slice(0,10) let i = index">
|
||||||
<span>{{subject}}</span>
|
<span>{{subject}}</span>
|
||||||
|
@ -254,42 +229,9 @@
|
||||||
<span>{{(i == result.subjects.slice(0, 10).length - 1 && result.subjects.length > 10) ? "..." : ""}}</span>
|
<span>{{(i == result.subjects.slice(0, 10).length - 1 && result.subjects.length > 10) ? "..." : ""}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- Download from-->
|
|
||||||
<div *ngIf="result.hostedBy_collectedFrom && result.hostedBy_collectedFrom.length > 0"
|
|
||||||
class="uk-margin-small-bottom">
|
|
||||||
<div *ngFor="let from of result.hostedBy_collectedFrom"
|
|
||||||
[title]="from.accessRight ? from.accessRight : 'Not available'"
|
|
||||||
class="uk-flex uk-flex-middle">
|
|
||||||
<span
|
|
||||||
[class]="'uk-margin-small-right ' + (from.accessRightIcon == 'lock_open' ? 'uk-text-success' : 'uk-text-meta')">
|
|
||||||
<icon [name]="from.accessRightIcon" flex="true" type="outlined"></icon>
|
|
||||||
</span>
|
|
||||||
<span class="uk-width-expand">
|
|
||||||
<span class="uk-margin-right uk-display-inline-block">
|
|
||||||
<span class="uk-text-meta">Download from: </span>
|
|
||||||
<a *ngIf="from.downloadUrl"
|
|
||||||
[href]="from.downloadUrl" target="_blank" class="title">
|
|
||||||
<span class="custom-external">{{from.downloadNames.join("; ")}}</span>
|
|
||||||
</a>
|
|
||||||
<span *ngIf="!from.downloadUrl || from.downloadUrl.length === 0" class="title">
|
|
||||||
<span>{{from.downloadNames.join(", ")}}</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span class="provider uk-display-inline-block">
|
|
||||||
<span class="uk-text-meta">Provider: </span>
|
|
||||||
<a *ngFor="let collectedName of from.collectedNamesAndIds.keys(); let i=index"
|
|
||||||
[routerLink]="dataProviderUrl"
|
|
||||||
[queryParams]="{datasourceId: from.collectedNamesAndIds.get(collectedName)}" (click)="onClick();">
|
|
||||||
{{collectedName}}
|
|
||||||
<ng-container *ngIf="(i !== (from.collectedNamesAndIds.size - 1))">; </ng-container>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 4th section (description) -->
|
<!-- 4th section (description) -->
|
||||||
<div class="section4 uk-text-small">
|
<div class="uk-text-small">
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<div *ngIf="result.description" class="multi-line-ellipsis lines-3">
|
<div *ngIf="result.description" class="multi-line-ellipsis lines-3">
|
||||||
<p class="uk-text-meta" [innerHTML]="result.description"></p>
|
<p class="uk-text-meta" [innerHTML]="result.description"></p>
|
||||||
|
@ -297,7 +239,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 5th section(deposit only) -->
|
<!-- 5th section(deposit only) -->
|
||||||
<div>
|
<div>
|
||||||
<span class="uk-width-expand uk-flex-right">
|
<span class="uk-flex uk-flex-right uk-margin-small-top">
|
||||||
<a *ngIf="result.websiteURL && promoteWebsiteURL" href="{{result.websiteURL}}" target="_blank" type="submit"
|
<a *ngIf="result.websiteURL && promoteWebsiteURL" href="{{result.websiteURL}}" target="_blank" type="submit"
|
||||||
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
||||||
<span class="uk-flex uk-flex-middle">
|
<span class="uk-flex uk-flex-middle">
|
||||||
|
@ -311,108 +253,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--&& loggedIn (card footer)-->
|
<!--&& loggedIn (card footer)-->
|
||||||
<div *ngIf="result.measure ||((properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator')
|
<div *ngIf="result.hostedBy_collectedFrom || result.measure?.bip.length || result.measure?.counts.length"
|
||||||
&& ((showOrcid && result.identifiers && result.identifiers.size > 0 && isResultType) || result.orcidCreationDates?.length > 0))"
|
class="uk-text-small" [class.uk-visible@m]="!result.measure?.bip.length && result.measure?.counts.length" [ngClass]="{'uk-card-footer': isCard}">
|
||||||
class="uk-text-small"
|
<div class="uk-grid uk-grid-small uk-flex-between uk-flex-middle uk-grid-divider uk-margin-xsmall-bottom" uk-grid>
|
||||||
[ngClass]="{'uk-card-footer': isCard}">
|
<div *ngIf="result.hostedBy_collectedFrom" class="uk-width-auto uk-visible@m">
|
||||||
<!-- Impact Factors-->
|
<availableOn [availableOn]="result.hostedBy_collectedFrom" [source]="false"></availableOn>
|
||||||
<span class="uk-flex uk-flex-top uk-flex-wrap" style="grid-gap: 10px;">
|
|
||||||
<ng-container *ngIf="result.measure?.length">
|
|
||||||
<!--Popularity -->
|
|
||||||
<a title="Popularity"
|
|
||||||
class="popularity-{{result.measure[0]}} uk-margin-right uk-flex uk-flex-middle uk-width-auto@s uk-width-1-1">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="10.749" height="14.33" viewBox="0 0 10.749 14.33"><defs><!--<style>.a{fill:#d51717;}</style>--></defs><path
|
|
||||||
class="a"
|
|
||||||
d="M10.382.67a14.44,14.44,0,0,1,.5,3.225A2.331,2.331,0,0,1,8.589,6.4,2.445,2.445,0,0,1,6.15,3.895l.02-.242A9.25,9.25,0,0,0,4,9.625a5.375,5.375,0,0,0,10.749,0A11.5,11.5,0,0,0,10.382.67ZM9.18,12.985a2.134,2.134,0,0,1-2.163-2.11A2.1,2.1,0,0,1,8.9,8.779a5.181,5.181,0,0,0,3.1-1.733,9.374,9.374,0,0,1,.4,2.714A3.226,3.226,0,0,1,9.18,12.985Z"
|
|
||||||
transform="translate(-4 -0.67)"/>
|
|
||||||
</svg>
|
|
||||||
<span class="uk-margin-small-left">
|
|
||||||
{{" " + result.measure[2] + " popularity" }}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="default-dropdown uk-margin-remove-top uk-padding-small"
|
|
||||||
uk-dropdown="pos: bottom-left; mode:click" style="min-width: 70px !important;">
|
|
||||||
<span class="uk-flex uk-flex-middle">
|
|
||||||
<span class="popularity-{{result.measure[0]}}">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20.234" height="26.974"
|
|
||||||
viewBox="0 0 20.234 26.974"><defs> </defs><path class="a"
|
|
||||||
d="M16.014.67a27.181,27.181,0,0,1,.936,6.07c0,2.605-1.707,4.717-4.312,4.717A4.6,4.6,0,0,1,8.047,6.74l.038-.455A17.411,17.411,0,0,0,4,17.527a10.117,10.117,0,0,0,20.234,0A21.643,21.643,0,0,0,16.014.67ZM13.75,23.85A4.016,4.016,0,0,1,9.678,19.88c0-2.049,1.328-3.49,3.554-3.946a9.753,9.753,0,0,0,5.843-3.263,17.645,17.645,0,0,1,.746,5.109,6.072,6.072,0,0,1-6.07,6.07Z"
|
|
||||||
transform="translate(-4 -0.67)"/>
|
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
<span class="uk-margin-small-left">
|
|
||||||
{{" " + result.measure[2] + " popularity" }}
|
|
||||||
</span>
|
|
||||||
<span class="uk-margin-small-left">
|
|
||||||
{{" " + (result.measure[0] == 'A' ? 'In top 0.01%' : '') + (result.measure[0] == 'B' ? 'In top 1%' : '') + (result.measure[0] == 'C' ? 'In bottom 99%' : '')}}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<div class="uk-text-meta uk-margin">
|
|
||||||
Popularity: Citation-based measure reflecting the current impact.
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div *ngIf="hasActions" class="uk-width-expand uk-visible@m">
|
||||||
<a title="Link to Bip!Finder" class="uk-float-right" target="_blank"
|
<span class="uk-grid uk-grid-small uk-child-width-auto uk-text-xsmall" uk-grid>
|
||||||
href="https://bip.imis.athena-innovation.gr/site/details?id={{result.objId}}">
|
<span *ngIf="orcid">
|
||||||
View more details
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--Influence -->
|
|
||||||
<a title="Influence"
|
|
||||||
class="influence-{{result.measure[1]}} uk-margin-right uk-flex uk-flex-middle uk-width-auto@s uk-width-1-1">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="12.667" height="14" viewBox="0 0 12.667 14">
|
|
||||||
<defs><!--<style>.a{fill:#e1920a;}</style>--></defs>
|
|
||||||
<path class="a"
|
|
||||||
d="M3.333,7v4.667h2V7Zm4,0v4.667h2V7ZM2,15H14.667V13H2Zm9.333-8v4.667h2V7Zm-3-6L2,4.333V5.667H14.667V4.333Z"
|
|
||||||
transform="translate(-2 -1)"/>
|
|
||||||
</svg>
|
|
||||||
<span class="uk-margin-small-left">
|
|
||||||
{{" " + result.measure[3] + " influence" }}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="default-dropdown uk-margin-remove-top uk-padding-small"
|
|
||||||
uk-dropdown="pos: bottom-left; mode:click" style="min-width: 70px !important;">
|
|
||||||
<span class="uk-flex uk-flex-middle">
|
|
||||||
<span class="influence-{{result.measure[1]}}">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24.299" height="26.857" viewBox="0 0 24.299 26.857"><defs><style>.a {
|
|
||||||
fill: #464646;
|
|
||||||
}</style></defs><path class="a"
|
|
||||||
d="M4.558,12.51v8.952H8.394V12.51Zm7.673,0v8.952h3.837V12.51ZM2,27.857H26.3V24.02H2ZM19.9,12.51v8.952h3.837V12.51ZM14.149,1,2,7.394V9.952H26.3V7.394Z"
|
|
||||||
transform="translate(-2 -1)"/>
|
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
<span class=" uk-margin-small-left">
|
|
||||||
{{result.measure[3] + " influence" }}
|
|
||||||
</span>
|
|
||||||
<span class="uk-margin-small-left">
|
|
||||||
{{" " + (result.measure[1] == 'A' ? 'In top 0.01%' : '') + (result.measure[1] == 'B' ? 'In top 1%' : '') + (result.measure[1] == 'C' ? 'In bottom 99%' : '')}}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<div class="uk-text-meta uk-margin">
|
|
||||||
Influence: Citation-based measure reflecting the total impact.
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a title="Link to Bip!Finder" class=" uk-float-right" target="_blank"
|
|
||||||
href="https://bip.imis.athena-innovation.gr/site/details?id={{result.objId}}">
|
|
||||||
View more details
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
|
||||||
<!-- && loggedIn -->
|
|
||||||
<!-- TODO: change colors/opacity and disabled attr for ORCID buttons -->
|
|
||||||
<span *ngIf="(properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator')
|
|
||||||
&& showOrcid && result.identifiers && result.identifiers.size > 0 && isResultType"
|
|
||||||
class="uk-margin-auto-left">
|
|
||||||
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0"
|
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||||
[resultId]="result.relcanId" [resultTitle]="result.title"
|
[resultId]="result.relcanId" [resultTitle]="result.title"
|
||||||
[type]="result.resultType" [pageType]="'search'"
|
[type]="result.resultType" [pageType]="'search'"
|
||||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers">
|
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers">
|
||||||
</orcid-work>
|
</orcid-work>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span *ngIf="orcid" class="uk-width-expand uk-text-right">
|
||||||
*ngIf="(properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community') && result.orcidCreationDates?.length > 0"
|
|
||||||
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:
|
||||||
|
@ -427,4 +283,47 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<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">
|
||||||
|
<ng-container *ngIf="result.measure?.bip.length">
|
||||||
|
<a class="uk-flex uk-flex-middle uk-link-reset">
|
||||||
|
<icon customClass="bip-icon-hover" [flex]="true" [ratio]="0.7" [name]="result.measure.bip[0].icon"></icon>
|
||||||
|
<span class="uk-margin-xsmall-left">{{result.measure.bip[0].value}}</span>
|
||||||
|
</a>
|
||||||
|
<div uk-drop="pos: top-left" class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||||
|
<table>
|
||||||
|
<tr *ngFor="let metric of result.measure.bip">
|
||||||
|
<td class="bip-icon"><icon [flex]="true" [ratio]="0.7" [name]="metric.icon"></icon></td>
|
||||||
|
<td class="uk-text-capitalize">{{metric.name}}</td>
|
||||||
|
<td class="uk-text-bolder">{{metric.value}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="uk-margin-top uk-flex uk-flex-middle uk-flex-center">
|
||||||
|
<img class="uk-margin-xsmall-right" width="15" src="assets/common-assets/bip-minimal.svg" loading="lazy" alt="BIP!">
|
||||||
|
<span class="uk-text-uppercase">Powered by <span class="uk-text-bolder">BIP!</span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="result.measure?.counts.length">
|
||||||
|
<a class="uk-flex uk-flex-middle uk-margin-small-left uk-link-reset">
|
||||||
|
<icon class="text-usage-counts-hover" [flex]="true" [ratio]="0.8" [name]="result.measure.counts[0].icon"></icon>
|
||||||
|
<span class="uk-margin-xsmall-left">{{result.measure.counts[0].value}}</span>
|
||||||
|
</a>
|
||||||
|
<div uk-drop="pos: top-left" class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||||
|
<table>
|
||||||
|
<tr *ngFor="let metric of result.measure.counts">
|
||||||
|
<td class="text-usage-counts"><icon [flex]="true" [ratio]="0.7" [name]="metric.icon"></icon></td>
|
||||||
|
<td class="uk-text-capitalize">{{metric.name}}</td>
|
||||||
|
<td class="uk-text-bolder">{{metric.value}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="uk-margin-top uk-flex uk-flex-middle uk-flex-center">
|
||||||
|
<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" loading="lazy" alt="BIP!">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,4 +14,15 @@
|
||||||
.popularity-C, .popularity-C5, .influence-C, .influence-C5 {
|
.popularity-C, .popularity-C5, .influence-C, .influence-C5 {
|
||||||
& svg a {
|
& svg a {
|
||||||
fill: #444;
|
fill: #444;
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.metrics {
|
||||||
|
& .uk-drop {
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& table td {
|
||||||
|
padding: 2px 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
import {RouterHelper} from "../routerHelper.class";
|
import {RouterHelper} from "../routerHelper.class";
|
||||||
import {AlertModal} from "../modal/alert";
|
import {AlertModal} from "../modal/alert";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {Session} from "../../login/utils/helper.class";
|
|
||||||
import {Identifier, StringUtils} from "../string-utils.class";
|
import {Identifier, StringUtils} from "../string-utils.class";
|
||||||
import {OpenaireEntities} from "../properties/searchFields";
|
import {OpenaireEntities} from "../properties/searchFields";
|
||||||
import {HelperFunctions} from "../HelperFunctions.class";
|
import {HelperFunctions} from "../HelperFunctions.class";
|
||||||
|
@ -29,8 +28,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
public urlParam: string;
|
public urlParam: string;
|
||||||
public url: string;
|
public url: string;
|
||||||
@Input() externalUrl: string;
|
@Input() externalUrl: string;
|
||||||
public type: string;
|
|
||||||
public beforeTitle: string[] = [];
|
|
||||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||||
@Input() showOrcid: boolean = true;
|
@Input() showOrcid: boolean = true;
|
||||||
@Input() showEnermaps: boolean = false;
|
@Input() showEnermaps: boolean = false;
|
||||||
|
@ -38,20 +36,35 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
@Input() provenanceActionVocabulary = null;
|
@Input() provenanceActionVocabulary = null;
|
||||||
@Input() relationsVocabulary = null;
|
@Input() relationsVocabulary = null;
|
||||||
|
|
||||||
|
/* Metadata */
|
||||||
|
public type: string;
|
||||||
|
public types: string[];
|
||||||
|
public provenanceAction: string;
|
||||||
|
public relationName: string;
|
||||||
|
|
||||||
|
public linking: boolean = false;
|
||||||
|
public share: boolean = false;
|
||||||
|
public cite: boolean = false;
|
||||||
|
public orcid: boolean = false;
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.hasLink) {
|
if (this.hasLink) {
|
||||||
if (this.result.resultType === "publication") {
|
if (this.result.resultType === "publication") {
|
||||||
this.urlParam = "articleId";
|
this.urlParam = "articleId";
|
||||||
this.url = properties.searchLinkToPublication.split('?')[0];
|
this.url = properties.searchLinkToPublication.split('?')[0];
|
||||||
|
this.resultActions();
|
||||||
} else if (this.result.resultType === "dataset") {
|
} else if (this.result.resultType === "dataset") {
|
||||||
this.urlParam = "datasetId";
|
this.urlParam = "datasetId";
|
||||||
this.url = properties.searchLinkToDataset.split('?')[0];
|
this.url = properties.searchLinkToDataset.split('?')[0];
|
||||||
|
this.resultActions();
|
||||||
} else if (this.result.resultType === "software") {
|
} else if (this.result.resultType === "software") {
|
||||||
this.urlParam = "softwareId";
|
this.urlParam = "softwareId";
|
||||||
this.url = properties.searchLinkToSoftwareLanding.split('?')[0];
|
this.url = properties.searchLinkToSoftwareLanding.split('?')[0];
|
||||||
|
this.resultActions();
|
||||||
} else if (this.result.resultType === "other") {
|
} else if (this.result.resultType === "other") {
|
||||||
this.urlParam = "orpId";
|
this.urlParam = "orpId";
|
||||||
this.url = properties.searchLinkToOrp.split('?')[0];
|
this.url = properties.searchLinkToOrp.split('?')[0];
|
||||||
|
this.resultActions();
|
||||||
} else if (this.result.resultType == "project") {
|
} else if (this.result.resultType == "project") {
|
||||||
if (this.result.id) {
|
if (this.result.id) {
|
||||||
this.urlParam = "projectId";
|
this.urlParam = "projectId";
|
||||||
|
@ -80,7 +93,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
}
|
}
|
||||||
this.checkPID();
|
this.checkPID();
|
||||||
}
|
}
|
||||||
this.initBeforeTitle();
|
this.initMetadata();
|
||||||
if (this.result.languages) {
|
if (this.result.languages) {
|
||||||
this.result.languages = this.removeUnknown(this.result.languages);
|
this.result.languages = this.removeUnknown(this.result.languages);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +102,14 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultActions() {
|
||||||
|
this.linking = true;
|
||||||
|
this.share = true;
|
||||||
|
this.cite = true;
|
||||||
|
this.orcid = (this.properties.adminToolsPortalType == 'explore' || this.properties.adminToolsPortalType == 'community' || this.properties.adminToolsPortalType == 'aggregator') &&
|
||||||
|
this.showOrcid && this.result.identifiers && this.result.identifiers.size > 0;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes.result && this.hasLink) {
|
if (changes.result && this.hasLink) {
|
||||||
this.checkPID();
|
this.checkPID();
|
||||||
|
@ -109,35 +130,28 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
return Identifier.getPIDFromIdentifiers(this.result.identifiers);
|
return Identifier.getPIDFromIdentifiers(this.result.identifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public initBeforeTitle() {
|
public initMetadata() {
|
||||||
if (this.result.resultType && this.result.resultType !== 'dataprovider') {
|
if (this.result.resultType && this.result.resultType !== 'dataprovider') {
|
||||||
this.type = this.getTypeName(this.result.resultType);
|
this.type = this.getTypeName(this.result.resultType);
|
||||||
}
|
}
|
||||||
if (this.result.types) {
|
if (this.result.types) {
|
||||||
this.removeUnknown(this.removeDuplicates(this.result.types)).forEach(type => {
|
this.types = this.removeUnknown(this.removeDuplicates(this.result.types));
|
||||||
this.beforeTitle.push(type);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.result.year) {
|
|
||||||
this.beforeTitle.push(this.result.year.toString());
|
|
||||||
}
|
|
||||||
if (this.result.startYear && this.result.endYear) {
|
|
||||||
this.beforeTitle.push(this.result.startYear.toString() + ' - ' + this.result.endYear.toString());
|
|
||||||
}
|
}
|
||||||
if (this.result.provenanceAction) {
|
if (this.result.provenanceAction) {
|
||||||
let value = HelperFunctions.getVocabularyLabel(this.result.provenanceAction, this.provenanceActionVocabulary, false);
|
this.provenanceAction = HelperFunctions.getVocabularyLabel(this.result.provenanceAction, this.provenanceActionVocabulary, false);
|
||||||
if (value) {
|
|
||||||
this.beforeTitle.push(value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.result.relationName) {
|
if (this.result.relationName) {
|
||||||
this.beforeTitle.push(HelperFunctions.getVocabularyLabel(this.result.relationName, this.relationsVocabulary));
|
this.relationName = HelperFunctions.getVocabularyLabel(this.result.relationName, this.relationsVocabulary);
|
||||||
}
|
}
|
||||||
// if(this.result.percentage) {
|
// if(this.result.percentage) {
|
||||||
// this.beforeTitle.push((this.result.relation ? this.result.relation+": " : "") + this.result.percentage.toString() + "%");
|
// this.beforeTitle.push((this.result.relation ? this.result.relation+": " : "") + this.result.percentage.toString() + "%");
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get hasActions() {
|
||||||
|
return this.linking || this.share || this.cite || this.orcid;
|
||||||
|
}
|
||||||
|
|
||||||
public getTypeName(type: string): string {
|
public getTypeName(type: string): string {
|
||||||
return StringUtils.getEntityName(type, false);
|
return StringUtils.getEntityName(type, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,16 @@ import {ShowAuthorsModule} from "../authors/showAuthors.module";
|
||||||
import {ResultLandingUtilsModule} from "../../landingPages/landing-utils/resultLandingUtils.module";
|
import {ResultLandingUtilsModule} from "../../landingPages/landing-utils/resultLandingUtils.module";
|
||||||
import {OrcidModule} from "../../orcid/orcid.module";
|
import {OrcidModule} from "../../orcid/orcid.module";
|
||||||
import {IconsModule} from "../icons/icons.module";
|
import {IconsModule} from "../icons/icons.module";
|
||||||
|
import {IconsService} from "../icons/icons.service";
|
||||||
|
import {cite, fire, graph, landmark, link, link_to, quotes, rocket, versions} from "../icons/icons";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [CommonModule, RouterModule, ShowAuthorsModule, ResultLandingUtilsModule, OrcidModule, IconsModule],
|
imports: [CommonModule, RouterModule, ShowAuthorsModule, ResultLandingUtilsModule, OrcidModule, IconsModule],
|
||||||
declarations: [ResultPreviewComponent],
|
declarations: [ResultPreviewComponent],
|
||||||
exports: [ResultPreviewComponent]
|
exports: [ResultPreviewComponent]
|
||||||
})
|
})
|
||||||
export class ResultPreviewModule {}
|
export class ResultPreviewModule {
|
||||||
|
constructor(private iconsService: IconsService) {
|
||||||
|
this.iconsService.registerIcons([link, quotes, cite, link_to, rocket, fire, landmark])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {SearchResult} from "../entities/searchResult";
|
import {SearchResult} from "../entities/searchResult";
|
||||||
import {Measure, ResultLandingInfo} from "../entities/resultLandingInfo";
|
import {Measure, Metric, ResultLandingInfo} from "../entities/resultLandingInfo";
|
||||||
import {OrganizationInfo} from "../entities/organizationInfo";
|
import {OrganizationInfo} from "../entities/organizationInfo";
|
||||||
|
|
||||||
export interface HostedByCollectedFrom {
|
export interface HostedByCollectedFrom {
|
||||||
|
@ -199,6 +199,7 @@ export class ResultPreview {
|
||||||
resultPreview.identifiers = result.identifiers;
|
resultPreview.identifiers = result.identifiers;
|
||||||
resultPreview.enermapsId = result.enermapsId;
|
resultPreview.enermapsId = result.enermapsId;
|
||||||
resultPreview.measure = result.measure;
|
resultPreview.measure = result.measure;
|
||||||
|
resultPreview.hostedBy_collectedFrom = result.hostedBy_collectedFrom;
|
||||||
return resultPreview;
|
return resultPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue