Merge from develop
This commit is contained in:
commit
cfb321f93f
|
@ -9,7 +9,7 @@ export class ConnectHelper {
|
||||||
if(properties.environment == "development" &&
|
if(properties.environment == "development" &&
|
||||||
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|
||||||
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
|
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
|
||||||
domain = "test.openaire.eu"; //for testing
|
domain = "covid-19.openaire.eu"; //for testing
|
||||||
}
|
}
|
||||||
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
||||||
if (domain.indexOf('eosc-portal.eu') != -1) {
|
if (domain.indexOf('eosc-portal.eu') != -1) {
|
||||||
|
|
|
@ -11,45 +11,60 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
selector: 'availableOn',
|
selector: 'availableOn',
|
||||||
template: `
|
template: `
|
||||||
<ng-container *ngIf="availableOn && availableOn.length > 0">
|
<ng-container *ngIf="availableOn && availableOn.length > 0">
|
||||||
<div class="uk-flex uk-flex-middle" [ngClass]="isMobile && !(usedBy == 'landing') ? 'uk-margin-left uk-margin-xsmall-bottom' : ''">
|
<div class="uk-flex uk-flex-middle"
|
||||||
<ng-container *ngIf="availableOn[0].downloadUrl">
|
[ngClass]="isMobile ? ('uk-flex-column ' + (!(usedBy == 'landing') ? 'uk-margin-left uk-margin-xsmall-bottom' : '')) : 'uk-grid uk-grid-small uk-child-width-auto'"
|
||||||
<span [class]="'uk-margin-xsmall-right ' + (availableOn[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
[attr.uk-grid]="!isMobile ? '' : null">
|
||||||
uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)">
|
<div *ngIf="properties.environment != 'production' && availableOn[0].fulltext" class="uk-flex uk-flex-middle"
|
||||||
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
[ngClass]="isMobile ? 'uk-width-1-1' : 'uk-text-bolder'">
|
||||||
</span>
|
<a [href]="availableOn[0].fulltext" target="_blank"
|
||||||
<ng-container *ngIf="!isMobile">
|
class="uk-flex uk-flex-middle uk-button-link"
|
||||||
<a uk-tooltip="Source" target="_blank"
|
[ngClass]="isMobile ? ((usedBy == 'landing') ? 'uk-width-1-1 uk-padding-small uk-padding-remove-horizontal' : '') : 'uk-flex-center'">
|
||||||
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
<!-- <icon [flex]="true" [ratio]="0.7" name="download" visuallyHidden="download"></icon>-->
|
||||||
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
<icon name="download" visuallyHidden="donwload" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
||||||
<span>
|
<span class="uk-margin-xsmall-left">Full-Text</span>
|
||||||
<!-- <icon [flex]="true" [name]="'expand_' + (isOpen?'less':'more')"></icon>-->
|
</a>
|
||||||
<icon [flex]="true" [name]="(isOpen?'arrow_drop_up':'arrow_drop_down')"></icon>
|
</div>
|
||||||
</span>
|
<div *ngIf="isMobile && (usedBy == 'landing') && availableOn[0].fulltext" class="uk-width-1-1"><hr></div>
|
||||||
</a>
|
<div *ngIf="availableOn[0].downloadUrl" [ngClass]="isMobile ? 'uk-width-1-1' : ''">
|
||||||
<div #dropElement uk-drop="mode: click; pos: bottom-left; flip: false; shift: false" class="uk-drop download-drop">
|
<div class="uk-flex uk-flex-middle" [ngClass]="isMobile ? ((usedBy == 'landing') ? 'uk-padding-small uk-padding-remove-horizontal' : '') : ''">
|
||||||
|
<span [class]="'uk-margin-xsmall-right ' + (availableOn[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||||
|
uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)">
|
||||||
|
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
||||||
|
</span>
|
||||||
|
<ng-container *ngIf="!isMobile">
|
||||||
|
<a uk-tooltip="Source" target="_blank"
|
||||||
|
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
||||||
|
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
||||||
|
<span>
|
||||||
|
<!-- <icon [flex]="true" [name]="'expand_' + (isOpen?'less':'more')"></icon>-->
|
||||||
|
<icon [flex]="true" [name]="(isOpen?'arrow_drop_up':'arrow_drop_down')"></icon>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<div #dropElement uk-drop="mode: click; pos: bottom-left; flip: false; shift: false" class="uk-drop download-drop">
|
||||||
<div class="uk-card uk-card-default uk-padding-small uk-padding-remove-horizontal uk-text-small uk-height-max-large uk-overflow-auto">
|
<div class="uk-card uk-card-default uk-padding-small uk-padding-remove-horizontal uk-text-small uk-height-max-large uk-overflow-auto">
|
||||||
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngIf="isMobile">
|
<ng-container *ngIf="isMobile">
|
||||||
<a #toggle class="uk-flex uk-flex-between uk-flex-middle uk-flex-center uk-width-expand uk-button-link">
|
<a #toggle class="uk-flex uk-flex-between uk-flex-middle uk-flex-center uk-width-expand uk-button-link">
|
||||||
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
||||||
<span>
|
<span>
|
||||||
<icon [flex]="true" ratio="1.5" name="arrow_right"></icon>
|
<icon [flex]="true" ratio="1.5" name="arrow_right"></icon>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<mobile-dropdown [toggle]="toggle">
|
<mobile-dropdown [toggle]="toggle">
|
||||||
<div class="uk-text-emphasis uk-text-bolder uk-text-center uk-padding-small uk-padding-remove-vertical uk-text-uppercase">
|
<div class="uk-text-emphasis uk-text-bolder uk-text-center uk-padding-small uk-padding-remove-vertical uk-text-uppercase">
|
||||||
Sources
|
Sources
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-text-small download-drop uk-padding uk-padding-remove-horizontal">
|
<div class="uk-text-small download-drop uk-padding uk-padding-remove-horizontal">
|
||||||
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</mobile-dropdown>
|
</mobile-dropdown>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
@ -80,6 +95,14 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
</a>
|
</a>
|
||||||
<ng-template #elseBlock> {{instance.license}}</ng-template>
|
<ng-template #elseBlock> {{instance.license}}</ng-template>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="properties.environment != 'production' && instance.fulltext" class="uk-text-meta uk-text-truncate" uk-tooltip [title]="instance.fulltext">
|
||||||
|
Full-Text:
|
||||||
|
<a *ngIf="isUrl(instance.fulltext); else elseBlock"
|
||||||
|
[href]="instance.fulltext" target="_blank" class="custom-external uk-link-text">
|
||||||
|
{{instance.fulltext}}
|
||||||
|
</a>
|
||||||
|
<ng-template #elseBlock> {{instance.fulltext}}</ng-template>
|
||||||
|
</div>
|
||||||
<div *ngIf="instance.collectedNamesAndIds?.size > 0" class="uk-text-meta">
|
<div *ngIf="instance.collectedNamesAndIds?.size > 0" class="uk-text-meta">
|
||||||
<span>Data sources: </span>
|
<span>Data sources: </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" [routerLink]="dataProviderUrl"
|
||||||
|
@ -145,4 +168,6 @@ export class AvailableOnComponent {
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected readonly properties = properties;
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,8 @@ export class ParsingFunctions {
|
||||||
"accessRightIcon": "",
|
"accessRightIcon": "",
|
||||||
"types": [],
|
"types": [],
|
||||||
"years": [],
|
"years": [],
|
||||||
"license": ""
|
"license": "",
|
||||||
|
"fulltext": ""
|
||||||
};
|
};
|
||||||
|
|
||||||
if (instance.hasOwnProperty("hostedby")) {
|
if (instance.hasOwnProperty("hostedby")) {
|
||||||
|
@ -354,42 +355,59 @@ export class ParsingFunctions {
|
||||||
available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license'];
|
available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(instance.hasOwnProperty("fulltext")) {
|
||||||
|
available.fulltext = instance['fulltext'];
|
||||||
|
}
|
||||||
|
|
||||||
hostedBy_collectedFrom.push(available);
|
hostedBy_collectedFrom.push(available);
|
||||||
}
|
}
|
||||||
|
|
||||||
compareHostedByCollectedFrom(a: HostedByCollectedFrom, b: HostedByCollectedFrom) {
|
compareHostedByCollectedFrom(a: HostedByCollectedFrom, b: HostedByCollectedFrom) {
|
||||||
|
let retValue: number = 0;
|
||||||
let firstAccessRight: string = (a.accessRight ? a.accessRight.toLowerCase() : null);
|
let firstAccessRight: string = (a.accessRight ? a.accessRight.toLowerCase() : null);
|
||||||
let secondAccessRight: string = (b.accessRight ? b.accessRight.toLowerCase() : null);
|
let secondAccessRight: string = (b.accessRight ? b.accessRight.toLowerCase() : null);
|
||||||
|
|
||||||
if (firstAccessRight === secondAccessRight) {
|
if (firstAccessRight !== secondAccessRight) {
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
if (firstAccessRight === 'open access') {
|
if (firstAccessRight === 'open access') {
|
||||||
return -1;
|
retValue = -1;
|
||||||
} else if (secondAccessRight === 'open access') {
|
} else if (secondAccessRight === 'open access') {
|
||||||
return 1;
|
retValue = 1;
|
||||||
} else if (firstAccessRight === "open source") {
|
} else if (firstAccessRight === "open source") {
|
||||||
return -1;
|
retValue = -1;
|
||||||
} else if (secondAccessRight === "open source") {
|
} else if (secondAccessRight === "open source") {
|
||||||
return 1;
|
retValue = 1;
|
||||||
} else if (firstAccessRight === "embargo") {
|
} else if (firstAccessRight === "embargo") {
|
||||||
return -1;
|
retValue = -1;
|
||||||
} else if (secondAccessRight === "embargo") {
|
} else if (secondAccessRight === "embargo") {
|
||||||
return 1;
|
retValue = 1;
|
||||||
} else if (firstAccessRight === "restricted") {
|
} else if (firstAccessRight === "restricted") {
|
||||||
return -1;
|
retValue = -1;
|
||||||
} else if (secondAccessRight === "restricted") {
|
} else if (secondAccessRight === "restricted") {
|
||||||
return 1;
|
retValue = 1;
|
||||||
} else if (firstAccessRight === "closed access") {
|
} else if (firstAccessRight === "closed access") {
|
||||||
return -1;
|
retValue = -1;
|
||||||
} else if (secondAccessRight === "closed access") {
|
} else if (secondAccessRight === "closed access") {
|
||||||
return 1;
|
retValue = 1;
|
||||||
} else if (firstAccessRight === "not available") {
|
} else if (firstAccessRight === "not available") {
|
||||||
return -1;
|
retValue = -1;
|
||||||
} else if (secondAccessRight === "not available") {
|
} else if (secondAccessRight === "not available") {
|
||||||
return 1;
|
retValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(retValue == 0) {
|
||||||
|
let firstFulltext: string = (a.fulltext ? a.fulltext : null);
|
||||||
|
let secondFulltext: string = (b.fulltext ? b.fulltext : null);
|
||||||
|
|
||||||
|
if (firstFulltext && !secondFulltext) {
|
||||||
|
return -1;
|
||||||
|
} else if (!firstFulltext && secondFulltext) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -613,7 +613,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||||
<ng-container *ngIf="resultLandingInfo?.hostedBy_collectedFrom">
|
<ng-container *ngIf="resultLandingInfo?.hostedBy_collectedFrom">
|
||||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
<div class="">
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove"
|
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove"
|
||||||
(click)=" onSelectActiveTab('availableOn')">
|
(click)=" onSelectActiveTab('availableOn')">
|
||||||
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"
|
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim"
|
routerLinkActive="router-link-active" routerLink="/participate/direct-claim"
|
||||||
[title]="'Link '+openaireEntities.RESULTS+' with a '+openaireEntities.PROJECT+', a '+openaireEntities.COMMUNITY+' or other '+openaireEntities.RESULTS+' and make the new information available in OpenAIRE information space.'"
|
[title]="'Link '+openaireEntities.RESULTS+' with a '+openaireEntities.PROJECT+', a '+openaireEntities.COMMUNITY+' or other '+openaireEntities.RESULTS+' and make the new information available in OpenAIRE information space.'"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
||||||
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||||
<icon [flex]="true" [ratio]="0.7" name="link_to" visuallyHidden="link"></icon>
|
<icon [flex]="true" [ratio]="0.7" name="link_to" visuallyHidden="link"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Link to</span>
|
<span class="uk-margin-xsmall-left">Link to</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -25,15 +25,15 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
<a (click)="openAddThisModal()"
|
<a (click)="openAddThisModal()"
|
||||||
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'"
|
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||||
<icon [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
<icon class="uk-text-bolder" [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Share</span>
|
<span class="uk-margin-xsmall-left">Share</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="cite">
|
<div *ngIf="cite">
|
||||||
<a (click)="openCiteModal()"
|
<a (click)="openCiteModal()"
|
||||||
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||||
<icon [flex]="true" [ratio]="0.7" name="cite" visuallyHidden="cite"></icon>
|
<icon class="uk-text-bolder" [flex]="true" [ratio]="0.7" name="cite" visuallyHidden="cite"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Cite</span>
|
<span class="uk-margin-xsmall-left">Cite</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +41,7 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
<a routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how"
|
<a routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how"
|
||||||
[title]="'Find a repository to deposit or publish your research in Open Access'"
|
[title]="'Find a repository to deposit or publish your research in Open Access'"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
||||||
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||||
<icon flex="true" ratio="0.7" name="upload" visuallyHidden="upload"></icon>
|
<icon flex="true" ratio="0.7" name="upload" visuallyHidden="upload"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Deposit</span>
|
<span class="uk-margin-xsmall-left">Deposit</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -50,7 +50,7 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
<a (click)="openEmbedResultsModal()"
|
<a (click)="openEmbedResultsModal()"
|
||||||
[title]="'Embed the related '+openaireEntities.RESULTS+' of this '+getTypeName()+' in your website'"
|
[title]="'Embed the related '+openaireEntities.RESULTS+' of this '+getTypeName()+' in your website'"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
||||||
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||||
<icon flex="true" ratio="0.8" name="code" visuallyHidden="code"></icon>
|
<icon flex="true" ratio="0.8" name="code" visuallyHidden="code"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Embed</span>
|
<span class="uk-margin-xsmall-left">Embed</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -11,6 +11,7 @@ export interface HostedByCollectedFrom {
|
||||||
years: string[];
|
years: string[];
|
||||||
accessRightIcon: string;
|
accessRightIcon: string;
|
||||||
license?: string;
|
license?: string;
|
||||||
|
fulltext?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Journal {
|
export interface Journal {
|
||||||
|
|
Loading…
Reference in New Issue