Merge pull request 'Merging develop branch into master for PROD Explore October 2023 release' (#10) from develop into master
Reviewed-on: #10
This commit is contained in:
commit
b06e41c9a3
|
@ -1,5 +1,4 @@
|
|||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {SelectionCriteria} from "../../utils/entities/contentProvider";
|
||||
|
||||
export class CommunityInfo {
|
||||
|
@ -36,6 +35,11 @@ export class CommunityInfo {
|
|||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
public isOpen() {
|
||||
return !(this.membership && this.membership === 'byInvitation');
|
||||
}
|
||||
|
||||
public isPublic(){
|
||||
return this.status == "all" || this.status == "PUBLIC";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import {HttpParams} from '@angular/common/http';
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {Session} from "../login/utils/helper.class";
|
||||
import {CommunityInfo} from "./community/communityInfo";
|
||||
|
||||
export class ConnectHelper {
|
||||
|
||||
|
@ -53,7 +54,12 @@ export class ConnectHelper {
|
|||
}
|
||||
|
||||
|
||||
public static isPrivate(community, user) {
|
||||
return community && (community.isPrivate() || (community.isRestricted() && !(Session.isPortalAdministrator(user) || Session.isCommunityCurator(user) || Session.isManager("community", community.communityId, user))))
|
||||
public static isPrivate(community: CommunityInfo, user) {
|
||||
return community && (community.isPrivate() || (community.isRestricted() && !(
|
||||
Session.isPortalAdministrator(user) ||
|
||||
Session.isCommunityCurator(user) ||
|
||||
Session.isManager("community", community.communityId, user) ||
|
||||
(!community.isOpen() && Session.isMember('community', community.communityId, user))
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,44 +11,59 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
selector: 'availableOn',
|
||||
template: `
|
||||
<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' : ''">
|
||||
<ng-container *ngIf="availableOn[0].downloadUrl">
|
||||
<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;"
|
||||
class="uk-drop download-drop 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>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="isMobile">
|
||||
<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>
|
||||
<icon [flex]="true" ratio="1.5" name="arrow_right"></icon>
|
||||
<div class="uk-flex uk-flex-middle"
|
||||
[ngClass]="isMobile ? ('uk-flex-column ' + (!(usedBy == 'landing') ? 'uk-margin-left uk-margin-xsmall-bottom' : '')) : 'uk-grid uk-grid-small uk-child-width-auto'"
|
||||
[attr.uk-grid]="!isMobile ? '' : null">
|
||||
<div *ngIf="properties.environment != 'production' && availableOn[0].fulltext" class="uk-flex uk-flex-middle"
|
||||
[ngClass]="isMobile ? 'uk-width-1-1' : 'uk-text-bolder'">
|
||||
<a [href]="availableOn[0].fulltext" target="_blank"
|
||||
class="uk-flex uk-flex-middle uk-button-link"
|
||||
[ngClass]="isMobile ? ((usedBy == 'landing') ? 'uk-width-1-1 uk-padding-small uk-padding-remove-horizontal' : '') : 'uk-flex-center'">
|
||||
<!-- <icon [flex]="true" [ratio]="0.7" name="download" visuallyHidden="download"></icon>-->
|
||||
<icon name="download" visuallyHidden="donwload" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
||||
<span class="uk-margin-xsmall-left">Full-Text</span>
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="isMobile && (usedBy == 'landing') && availableOn[0].fulltext" class="uk-width-1-1"><hr></div>
|
||||
<div *ngIf="availableOn[0].downloadUrl" [ngClass]="isMobile ? 'uk-width-1-1' : ''">
|
||||
<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>
|
||||
</a>
|
||||
<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">
|
||||
Sources
|
||||
</div>
|
||||
<div class="uk-text-small download-drop uk-padding uk-padding-remove-horizontal">
|
||||
<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;"
|
||||
class="uk-drop download-drop 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>
|
||||
</div>
|
||||
</mobile-dropdown>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="isMobile">
|
||||
<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>
|
||||
<icon [flex]="true" ratio="1.5" name="arrow_right"></icon>
|
||||
</span>
|
||||
</a>
|
||||
<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">
|
||||
Sources
|
||||
</div>
|
||||
<div class="uk-text-small download-drop uk-padding uk-padding-remove-horizontal">
|
||||
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
||||
</div>
|
||||
</mobile-dropdown>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
|
@ -79,6 +94,14 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</a>
|
||||
<ng-template #elseBlock> {{instance.license}}</ng-template>
|
||||
</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">
|
||||
<span>Data sources: </span>
|
||||
<a *ngFor="let collectedName of getKeys(instance.collectedNamesAndIds); let i=index" [routerLink]="dataProviderUrl"
|
||||
|
@ -144,4 +167,6 @@ export class AvailableOnComponent {
|
|||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
protected readonly properties = properties;
|
||||
}
|
||||
|
|
|
@ -264,7 +264,8 @@ export class ParsingFunctions {
|
|||
"accessRightIcon": "",
|
||||
"types": [],
|
||||
"years": [],
|
||||
"license": ""
|
||||
"license": "",
|
||||
"fulltext": ""
|
||||
};
|
||||
|
||||
if (instance.hasOwnProperty("hostedby")) {
|
||||
|
@ -354,42 +355,59 @@ export class ParsingFunctions {
|
|||
available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license'];
|
||||
}
|
||||
|
||||
if(instance.hasOwnProperty("fulltext")) {
|
||||
available.fulltext = instance['fulltext'];
|
||||
}
|
||||
|
||||
hostedBy_collectedFrom.push(available);
|
||||
}
|
||||
|
||||
compareHostedByCollectedFrom(a: HostedByCollectedFrom, b: HostedByCollectedFrom) {
|
||||
let retValue: number = 0;
|
||||
let firstAccessRight: string = (a.accessRight ? a.accessRight.toLowerCase() : null);
|
||||
let secondAccessRight: string = (b.accessRight ? b.accessRight.toLowerCase() : null);
|
||||
|
||||
if (firstAccessRight === secondAccessRight) {
|
||||
return 0;
|
||||
} else {
|
||||
if (firstAccessRight !== secondAccessRight) {
|
||||
if (firstAccessRight === 'open access') {
|
||||
return -1;
|
||||
retValue = -1;
|
||||
} else if (secondAccessRight === 'open access') {
|
||||
return 1;
|
||||
retValue = 1;
|
||||
} else if (firstAccessRight === "open source") {
|
||||
return -1;
|
||||
retValue = -1;
|
||||
} else if (secondAccessRight === "open source") {
|
||||
return 1;
|
||||
retValue = 1;
|
||||
} else if (firstAccessRight === "embargo") {
|
||||
return -1;
|
||||
retValue = -1;
|
||||
} else if (secondAccessRight === "embargo") {
|
||||
return 1;
|
||||
retValue = 1;
|
||||
} else if (firstAccessRight === "restricted") {
|
||||
return -1;
|
||||
retValue = -1;
|
||||
} else if (secondAccessRight === "restricted") {
|
||||
return 1;
|
||||
retValue = 1;
|
||||
} else if (firstAccessRight === "closed access") {
|
||||
return -1;
|
||||
retValue = -1;
|
||||
} else if (secondAccessRight === "closed access") {
|
||||
return 1;
|
||||
retValue = 1;
|
||||
} else if (firstAccessRight === "not available") {
|
||||
return -1;
|
||||
retValue = -1;
|
||||
} 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -388,7 +388,7 @@
|
|||
<div>
|
||||
<ng-container *ngIf="resultLandingInfo.measure.bip.length">
|
||||
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip">
|
||||
<div *ngIf="measure.value" class="cell uk-flex uk-flex-middle uk-margin-xsmall-bottom">
|
||||
<div class="cell uk-flex uk-flex-middle uk-margin-xsmall-bottom">
|
||||
<icon [name]="measure.icon" [ratio]="0.8" [flex]="true"></icon>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -404,7 +404,7 @@
|
|||
<div>
|
||||
<ng-container *ngIf="resultLandingInfo.measure.bip.length">
|
||||
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip">
|
||||
<div *ngIf="measure.value" class="cell uk-margin-xsmall-bottom">
|
||||
<div class="cell uk-margin-xsmall-bottom">
|
||||
<a class="uk-text-capitalize">{{measure.name}}</a>
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: {option: measure.name, isCompact: false}"></ng-container>
|
||||
</div>
|
||||
|
@ -422,14 +422,14 @@
|
|||
<div class="uk-text-uppercase uk-text-bolder">
|
||||
<ng-container *ngIf="resultLandingInfo.measure.bip.length">
|
||||
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip">
|
||||
<ng-container *ngIf="isNumber(measure)">
|
||||
<div *ngIf="measure.value" [attr.uk-tooltip]="measure.value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
<ng-container *ngIf="isNumber(measure.value)">
|
||||
<div [attr.uk-tooltip]="measure.value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
title="{{measure.value | number}}" class="cell uk-margin-xsmall-bottom">
|
||||
{{formatNumber(measure.value)}}
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!isNumber(measure)">
|
||||
<div *ngIf="measure.value" class="cell uk-margin-xsmall-bottom">
|
||||
<ng-container *ngIf="!isNumber(measure.value)">
|
||||
<div class="cell uk-margin-xsmall-bottom">
|
||||
{{measure.value}}
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -611,7 +611,7 @@
|
|||
</div>
|
||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||
<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"
|
||||
(click)=" onSelectActiveTab('availableOn')">
|
||||
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"
|
||||
|
|
|
@ -34,7 +34,7 @@ import {ClearCacheService} from "../services/clear-cache.service";
|
|||
<loading></loading>
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #memberModal [overflowBody]="false" *ngIf="service == 'monitor'" (cancelOutput)="cancel()"
|
||||
<modal-alert #memberModal [overflowBody]="false" (cancelOutput)="cancel()"
|
||||
(alertOutput)="verifyMember()" [okDisabled]="(code.invalid || loading) && !isMember">
|
||||
<div *ngIf="!isMember">
|
||||
<div>
|
||||
|
@ -119,12 +119,8 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
ngAfterViewInit() {
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
if (this.paramsSubscription instanceof Subscription) {
|
||||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
this.paramsSubscription = this.route.queryParams.subscribe(params => {
|
||||
if (params) {
|
||||
this.isMember = !!params['isMember'];
|
||||
this.cdr.detectChanges();
|
||||
if(params['verify'] && !this.isMember) {
|
||||
if (this.user) {
|
||||
|
@ -133,7 +129,7 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this.type === this.verification.type) {
|
||||
if (this.verification.verificationType === 'manager') {
|
||||
this.openManagerModal();
|
||||
} else if (this.verification.verificationType === 'member' && this.service === "monitor") {
|
||||
} else if (this.verification.verificationType === 'member') {
|
||||
this.openMemberModal();
|
||||
} else {
|
||||
this.openErrorModal();
|
||||
|
@ -217,6 +213,9 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
this.managerModal.cancel();
|
||||
this.error = null;
|
||||
this.userManagementService.updateUserInfo(() => {
|
||||
if (this.paramsSubscription instanceof Subscription) {
|
||||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
if (this.service === "monitor") {
|
||||
this.loading = false;
|
||||
this.router.navigate(['/admin/' + this.verification.entity]);
|
||||
|
@ -254,8 +253,12 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
this.clearCacheService.clearCache('Members updated');
|
||||
this.loading = false;
|
||||
this.error = null;
|
||||
this.isMember = true;
|
||||
this.userManagementService.updateUserInfo(() => {
|
||||
this.router.navigate([], {queryParams: {'verify': null, 'isMember': true}});
|
||||
if (this.paramsSubscription instanceof Subscription) {
|
||||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
this.cancel();
|
||||
});
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
|
@ -271,6 +274,7 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
}
|
||||
|
||||
cancel() {
|
||||
this.router.navigate([], {queryParams: {'verify': null, 'isMember': null}});
|
||||
this.isMember = false;
|
||||
this.router.navigate([]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ export class SearchInputComponent implements OnInit, AfterViewInit {
|
|||
ngAfterViewInit() {
|
||||
if(typeof document !== 'undefined') {
|
||||
this.ratio = Number.parseFloat(getComputedStyle(this.searchInput.nativeElement).getPropertyValue('--search-input-icon-ratio'));
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -302,21 +302,23 @@ export class Composer {
|
|||
return message;
|
||||
}
|
||||
|
||||
public static composeEmailForCommunityDashboard(name: string, recipient: string) {
|
||||
public static composeEmailForCommunityDashboard(name: string, role: "manager" | "member", recipient: string) {
|
||||
let email: Email = new Email();
|
||||
email.subject = 'OpenAIRE Connect | ' + name;
|
||||
email.body = this.composeMessageForCommunityDashboard(name);
|
||||
email.body = this.composeMessageForCommunityDashboard(name, role);
|
||||
email.recipient = recipient;
|
||||
return email;
|
||||
}
|
||||
|
||||
public static composeMessageForCommunityDashboard(name: string, user: string = null, invitation: any = null) {
|
||||
public static composeMessageForCommunityDashboard(name: string, role: "manager" | "member", user: string = null, invitation: any = null) {
|
||||
let message = '<p>Dear ((__user__)),</p>' +
|
||||
'<p>You have been invited to be a manager of the OpenAIRE Research Community Dashboard for the ' + name + '.</p>' +
|
||||
'<p>You have been invited to be a ' + role + ' of the OpenAIRE Research Community Dashboard for the ' + name + '.</p>' +
|
||||
'<p>Click <a href="((__link__))" target="_blank">this URL</a> and use the verification code below to accept the invitation.</p>' +
|
||||
'<p>The verification code is <b>((__code__))</b>.</p>' +
|
||||
(role === 'manager'?
|
||||
'<p>As a manager of the OpenAIRE Research Community Dashboard, you will have access to the administration part of the dashboard, ' +
|
||||
'where you will be able to customize and manage the content of the ' + name + '.</p>' +
|
||||
'where you will be able to customize and manage the content of the ' + name + '.</p>':
|
||||
'<p>As a member of the OpenAIRE Research Community Dashboard, you will have access to the community dashboard and link research results with projects, communities and other research projects.</p>') +
|
||||
'<p>Please contact us at <a href="mailto:' + properties.helpdeskEmail+'">' + properties.helpdeskEmail +
|
||||
'</a> if you have any questions or concerns.</p>' +
|
||||
'<p>Kind Regards<br>The OpenAIRE Team</p>' +
|
||||
|
|
|
@ -16,7 +16,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
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.'"
|
||||
[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>
|
||||
<span class="uk-margin-xsmall-left">Link to</span>
|
||||
</a>
|
||||
|
@ -25,15 +25,15 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
<a (click)="openAddThisModal()"
|
||||
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
||||
[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'">
|
||||
<icon [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
||||
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 class="uk-text-bolder" [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
||||
<span class="uk-margin-xsmall-left">Share</span>
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="cite">
|
||||
<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'">
|
||||
<icon [flex]="true" [ratio]="0.7" name="cite" visuallyHidden="cite"></icon>
|
||||
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 class="uk-text-bolder" [flex]="true" [ratio]="0.7" name="cite" visuallyHidden="cite"></icon>
|
||||
<span class="uk-margin-xsmall-left">Cite</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -41,7 +41,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
<a routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how"
|
||||
[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'"
|
||||
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>
|
||||
<span class="uk-margin-xsmall-left">Deposit</span>
|
||||
</a>
|
||||
|
@ -50,7 +50,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
<a (click)="openEmbedResultsModal()"
|
||||
[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'"
|
||||
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>
|
||||
<span class="uk-margin-xsmall-left">Embed</span>
|
||||
</a>
|
||||
|
|
|
@ -12,6 +12,7 @@ export class FetchResearchResults {
|
|||
private errorMessages: ErrorMessagesComponent;
|
||||
|
||||
public results =[];
|
||||
public allResults =[]; // in case of paging
|
||||
|
||||
public requestComplete: Subject<void>;
|
||||
|
||||
|
@ -88,7 +89,8 @@ export class FetchResearchResults {
|
|||
this.subscriptions.push(this._searchResearchResultsService.advancedSearchResults(resultType, "", page, size, "resultdateofacceptance,descending", properties, "&type=results&fq=communityid=" + communityId +(contextId?'&fq=categoryid=' + encodeURIComponent(contextId):'')).subscribe(
|
||||
data => {
|
||||
this.searchUtils.totalResults = data[0];
|
||||
this.results = data[1];
|
||||
this.allResults = data[1];
|
||||
this.results = data[1].slice(0, 5) ;
|
||||
|
||||
this.searchUtils.status = this.errorCodes.DONE;
|
||||
if(this.searchUtils.totalResults == 0 ){
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
import {EnvProperties} from "../env-properties";
|
||||
|
||||
export let common: EnvProperties = {
|
||||
swhURL: "https://archive.softwareheritage.org/",
|
||||
// searchCrossrefAPIURL: "https://api.crossref.org/works",
|
||||
// searchDataciteAPIURL: "https://api.datacite.org/works",
|
||||
// searchOrcidURL: "https://pub.orcid.org/v2.1/",
|
||||
// orcidURL: "https://orcid.org/",
|
||||
// doiURL: "https://doi.org/",
|
||||
// pmcURL: "http://europepmc.org/articles/",
|
||||
// pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/",
|
||||
// handleURL: "http://hdl.handle.net/",
|
||||
// cordisURL: "http://cordis.europa.eu/projects/",
|
||||
// openDoarURL: "http://v2.sherpa.ac.uk/id/repository/",
|
||||
// r3DataURL: "http://service.re3data.org/repository/",
|
||||
// fairSharingURL: "https://fairsharing.org/",
|
||||
// sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
||||
// sherpaURLSuffix: "/",
|
||||
// zenodo: "https://zenodo.org/",
|
||||
// openAccess: "https://www.openaire.eu/support/faq#article-id-234",
|
||||
// openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310",
|
||||
// fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
|
||||
// h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
|
||||
// ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import {EnvProperties} from "../env-properties";
|
||||
|
||||
export let commonBeta: EnvProperties = {
|
||||
// searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/",
|
||||
// searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import {EnvProperties} from "../env-properties";
|
||||
|
||||
export let commonProd: EnvProperties = {
|
||||
// searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/",
|
||||
// searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources",
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import {EnvProperties} from "../env-properties";
|
||||
|
||||
export let commonTest: EnvProperties = {
|
||||
// searchAPIURLLAst: "https://services.openaire.eu/shadowSearch/v2/api/",
|
||||
// searchResourcesAPIURL: "https://services.openaire.eu/shadowSearch/v2/api/resources",
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import {EnvProperties} from "../env-properties";
|
||||
|
||||
export let commonDev: EnvProperties = {
|
||||
// searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/",
|
||||
// searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
|
||||
}
|
|
@ -11,6 +11,7 @@ export interface HostedByCollectedFrom {
|
|||
years: string[];
|
||||
accessRightIcon: string;
|
||||
license?: string;
|
||||
fulltext?: string;
|
||||
}
|
||||
|
||||
export interface Journal {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {Component, Input, SimpleChanges} from '@angular/core';
|
||||
import {EnvProperties} from "../../properties/env-properties";
|
||||
import {ErrorCodes} from "../../properties/errorCodes";
|
||||
import {OpenaireEntities} from "../../properties/searchFields";
|
||||
|
@ -41,7 +41,7 @@ import {StringUtils} from "../../string-utils.class";
|
|||
|
||||
<ng-container *ngIf="fetch.searchUtils.status == errorCodes.DONE">
|
||||
<search-result [properties]="properties"
|
||||
[results]="results"
|
||||
[results]="fetch.results"
|
||||
[status]="fetch.searchUtils.status"
|
||||
[type]="resultType" [showEnermaps]="showEnermaps" [prevPath]="prevPath">
|
||||
</search-result>
|
||||
|
@ -67,7 +67,6 @@ export class SearchTabComponent {
|
|||
@Input() properties: EnvProperties;
|
||||
@Input() customTitle;
|
||||
@Input() showEnermaps: boolean;
|
||||
@Input() currentPage: number = null;
|
||||
|
||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
|
||||
|
@ -75,10 +74,6 @@ export class SearchTabComponent {
|
|||
return StringUtils.getEntityName(entityType, true);
|
||||
}
|
||||
|
||||
get results() {
|
||||
return this.currentPage ? this.fetch.results.slice((this.currentPage - 1) * this.searchNumber, this.currentPage * this.searchNumber) : this.fetch.results;
|
||||
}
|
||||
|
||||
get paramsForExternalUrl() {
|
||||
let parameters: string = "";
|
||||
Object.keys(this.params).forEach(paramKey => {
|
||||
|
|
Loading…
Reference in New Issue