[Library | Trunk]: 1. Change name of communitesSearchResults to PortalSearchResults. 2. Add method on string utils to check if a word exists on a text. 3. Add description on stakeholder and create StakeholderInfo which extends Stakholder
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58860 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
90aec58af2
commit
034fbe3931
|
@ -25,16 +25,19 @@ export class Stakeholder {
|
|||
creationDate: Date = null;
|
||||
updateDate: Date;
|
||||
managers: string[];
|
||||
logoUrl:string;
|
||||
logoUrl: string;
|
||||
topics: Topic[];
|
||||
description: string;
|
||||
|
||||
constructor(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, alias: string, isActive: boolean, isPublic: boolean, logoUrl:string, defaultId: string = null) {
|
||||
this.initializeFunder(id, type, index_id, index_name, index_shortName, defaultId, alias, isActive, isPublic, logoUrl);
|
||||
constructor(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, alias: string, isActive: boolean,
|
||||
isPublic: boolean, logoUrl: string, defaultId: string = null, description: string = null) {
|
||||
this.initializeFunder(id, type, index_id, index_name, index_shortName, defaultId, alias, isActive, isPublic, logoUrl, description);
|
||||
this.topics = [];
|
||||
this.managers = [];
|
||||
}
|
||||
|
||||
initializeFunder(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, defaultId: string, alias: string, isActive: boolean, isPublic: boolean, logoUrl:string) {
|
||||
initializeFunder(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, defaultId: string,
|
||||
alias: string, isActive: boolean, isPublic: boolean, logoUrl: string, description: string = null) {
|
||||
this._id = id;
|
||||
this.type = type;
|
||||
this.index_id = index_id;
|
||||
|
@ -48,6 +51,10 @@ export class Stakeholder {
|
|||
}
|
||||
}
|
||||
|
||||
export class StakeholderInfo extends Stakeholder {
|
||||
isManager: boolean = false;
|
||||
}
|
||||
|
||||
export class Topic {
|
||||
_id: string;
|
||||
name: string;
|
||||
|
@ -102,7 +109,7 @@ export class SubCategory {
|
|||
defaultId: string;
|
||||
charts: Section[];
|
||||
numbers: Section[];
|
||||
recommendedFor:string[];
|
||||
recommendedFor: string[];
|
||||
|
||||
constructor(name: string, description: string, alias: string, isActive: boolean, isPublic: boolean, defaultId: string = null) {
|
||||
this._id = null;
|
||||
|
@ -114,7 +121,7 @@ export class SubCategory {
|
|||
this.defaultId = defaultId;
|
||||
this.charts = [];
|
||||
this.numbers = [];
|
||||
this.recommendedFor= [];
|
||||
this.recommendedFor = [];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -148,7 +155,7 @@ export class Indicator {
|
|||
isPublic: boolean;
|
||||
defaultId: string;
|
||||
indicatorPaths: IndicatorPath[];
|
||||
recommendedFor:string[];
|
||||
recommendedFor: string[];
|
||||
|
||||
constructor(name: string, description: string, type: IndicatorType, width: IndicatorWidth, isActive: boolean, isPublic: boolean, indicatorPaths: IndicatorPath[], defaultId: string = null) {
|
||||
this._id = null;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BehaviorSubject, Observable} from "rxjs";
|
||||
import {Indicator, Section, Stakeholder} from "../entities/stakeholder";
|
||||
import {Indicator, Section, Stakeholder, StakeholderInfo} from "../entities/stakeholder";
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {map} from "rxjs/operators";
|
||||
|
||||
|
@ -34,7 +34,7 @@ export class StakeholderService {
|
|||
}));
|
||||
}
|
||||
|
||||
getStakeholders(url: string, type: string = null): Observable<Stakeholder[]> {
|
||||
getStakeholders(url: string, type: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/stakeholder' + ((type)?('?type=' + type):'')).pipe(map(stakeholders => {
|
||||
return this.formalize(stakeholders);
|
||||
}));
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
<ul [class]="'uk-list uk-margin ' + custom_class" uk-height-match="target: .communityCard; row: false">
|
||||
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
||||
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto">
|
||||
<div class="uk-card uk-card-default portalSearchCard uk-position-relative uk-flex uk-flex-middle uk-grid uk-margin-remove-left" >
|
||||
<div class="badges">
|
||||
<div *ngIf="result.isSubscribed"
|
||||
class="portal-card-badge uk-text-center">
|
||||
<span>Subscribed</span>
|
||||
</div>
|
||||
<div *ngIf="result.status == 'manager'"
|
||||
class="private-card-badge uk-text-center ">
|
||||
<span>Private</span>
|
||||
</div>
|
||||
</div>
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
|
||||
class="uk-width-1-5">
|
||||
<div>
|
||||
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
|
||||
alt="{{(result.title)?result.title:result.shortTitle}} logo">
|
||||
<span *ngIf="result.logoUrl == null || result.logoUrl == '' && result.type != 'funder'" class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
cx="7.7" cy="8.6"
|
||||
r="3.5"></circle> <path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
|
||||
</span>
|
||||
<div *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type == 'funder' "
|
||||
[class]="'funderLogo ' + result['jurisdictionLogo'] "></div>
|
||||
</div>
|
||||
</a>
|
||||
<a *ngIf="!directLink"
|
||||
class="uk-width-1-5"
|
||||
(click)="confirmModalOpen(result)">
|
||||
<div>
|
||||
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
|
||||
alt="{{(result.title)?result.title:result.shortTitle}} logo">
|
||||
<span *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type != 'funder' " class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
cx="7.7" cy="8.6"
|
||||
r="3.5"></circle> <path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
|
||||
</span>
|
||||
<div *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type == 'funder' "
|
||||
[class]="'funderLogo ' + result['jurisdictionLogo'] "></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="uk-width-expand">
|
||||
<div [title]=result.shortTitle class="uk-text-large uk-grid">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
|
||||
[class]="(result.isManager)?'uk-width-3-4 portal-link':'portal-link'">
|
||||
{{(result.title) ? result.title : result.shortTitle}}
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''" class="portal-link">
|
||||
{{(result.title) ? result.title : result.shortTitle}}
|
||||
</a>
|
||||
<manage *ngIf="result.isManager" [communityId]="result.communityId"
|
||||
class="uk-width-expand uk-margin-auto-right"></manage>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-text-small">
|
||||
<span class="uk-text-muted" *ngIf="result.date">Creation Date:</span>
|
||||
<span class="space" *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
||||
<span *ngIf="showType && result.type && result.type != ''" class="uk-margin-left">
|
||||
<span class="uk-text-muted">Type:</span>
|
||||
<span class="space">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>
|
||||
</span>
|
||||
<span *ngIf="result['jurisdiction'] && result['jurisdiction']!=''" class="uk-margin-left">
|
||||
<span class="uk-text-muted">Jurisdiction:</span>
|
||||
<span class="space">{{result['jurisdiction']}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="result.description">
|
||||
<div class="text-justify descriptionText uk-text-small uk-text-muted uk-margin-auto-right" [title]="result.description">
|
||||
{{_formatDescription(result.description)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<modal-alert #AlertModal (alertOutput)="goToCommunityPage($event)">
|
||||
<div class="uk-text-left">
|
||||
You will be navigated to a new tab. Are you sure that you want to proceed?
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<ng-template #filters_column>
|
||||
<!-- let-dynamic_content="dynamic_content">-->
|
||||
<div *ngIf="selectedRangeFilters+selectedFilters + selectedTypesNum > 0"
|
||||
<!-- let-dynamic_content="dynamic_content">-->
|
||||
<div *ngIf="selectedRangeFilters+selectedFilters + selectedTypesNum > 0"
|
||||
class="uk-width-1-1 uk-margin-top uk-margin-medium-bottom ">
|
||||
<div class="uk-grid uk-flex uk-flex-bottom">
|
||||
<h5 class="uk-text-bold">Filters</h5>
|
||||
|
@ -12,16 +12,18 @@
|
|||
<div class="uk-grid uk-grid-small uk-text-small" uk-grid>
|
||||
<ng-container *ngIf="selectedTypesNum > 0 && resultTypes">
|
||||
<ng-container *ngFor="let type of resultTypeOptions; let i = index; let end = last; ">
|
||||
<ng-container *ngIf = "resultTypes[type.id] == true">
|
||||
<span [title]="'Remove '+ type.name" (click)="removeResultType(type.id) " >
|
||||
<ng-container *ngIf="resultTypes[type.id] == true">
|
||||
<span [title]="'Remove '+ type.name" (click)="removeResultType(type.id) ">
|
||||
<span class="selectedFilterLabel ">
|
||||
<a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">
|
||||
<span class=" clickable" aria-hidden="true">
|
||||
<span class="uk-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close"
|
||||
ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path
|
||||
fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</span>
|
||||
<span class="uk-margin-small-left" >{{type.name}}</span>
|
||||
<span class="uk-margin-small-left">{{type.name}}</span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
|
@ -29,14 +31,19 @@
|
|||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedRangeFilters > 0">
|
||||
<ng-container *ngFor="let filter of rangeFilters " >
|
||||
<ng-container *ngIf = "filter.selectedFromAndToValues">
|
||||
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
|
||||
<ng-container *ngFor="let filter of rangeFilters ">
|
||||
<ng-container *ngIf="filter.selectedFromAndToValues">
|
||||
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click)="removeRangeFilter(filter) ">
|
||||
<span class="selectedFilterLabel ">
|
||||
<a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">
|
||||
<span class=" clickable" aria-hidden="true">
|
||||
<span class="uk-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
||||
icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6"
|
||||
d="M16,16 L4,4"></path><path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.6"
|
||||
d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</span>
|
||||
<span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
|
||||
|
@ -46,46 +53,56 @@
|
|||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of filters " >
|
||||
<ng-container *ngIf = "filter.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let filter of filters ">
|
||||
<ng-container *ngIf="filter.countSelectedValues > 0">
|
||||
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "
|
||||
[title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
|
||||
[title]="'Remove '+value.name" (click)="removeFilter(value, filter) ">
|
||||
<!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
|
||||
<span class="selectedFilterLabel ">
|
||||
<a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">
|
||||
<span class=" clickable" aria-hidden="true">
|
||||
<span class="uk-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
||||
icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6"
|
||||
d="M16,16 L4,4"></path><path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.6"
|
||||
d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</span>
|
||||
<span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
|
||||
<span class="uk-margin-small-left"
|
||||
[innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="filters.length === 0 && results.length > 0" class="uk-margin-top">
|
||||
</div>
|
||||
<div *ngIf="filters.length === 0 && results.length > 0" class="uk-margin-top">
|
||||
<span class="uk-text-meta">No filters available</span>
|
||||
</div>
|
||||
<ul *ngIf="!showUnknownFilters"
|
||||
</div>
|
||||
<ul *ngIf="!showUnknownFilters"
|
||||
[class]="'uk-list uk-list-divider' + (selectedRangeFilters == 0 && selectedFilters == 0 ? ' uk-margin-small-top' : '')">
|
||||
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="disableForms"
|
||||
<quick-selections *ngIf="resultTypes" [resultTypes]="resultTypes" (typeChange)="queryChanged()"
|
||||
[isDisabled]="disableForms"
|
||||
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
|
||||
[properties]="properties" [vertical]="true" [delayTime]="0" >
|
||||
[properties]="properties" [vertical]="true" [delayTime]="0">
|
||||
</quick-selections>
|
||||
<ng-container *ngFor="let filter of rangeFilters">
|
||||
<li>
|
||||
<range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>
|
||||
<range-filter [isDisabled]="disableForms" [filter]="filter"
|
||||
(onFilterChange)="filterChanged($event)"></range-filter>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of filters ">
|
||||
<li *ngIf= "filter.values.length >0">
|
||||
<search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
|
||||
<li *ngIf="filter.values.length >0">
|
||||
<search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline"
|
||||
[isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount
|
||||
(onFilterChange)="filterChanged($event)"></search-filter>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</ul>
|
||||
</ng-template>
|
||||
|
||||
|
||||
|
@ -93,23 +110,26 @@
|
|||
' image-front-topbar uk-section-default uk-position-relative ' :
|
||||
(' uk-section uk-padding-remove-bottom uk-padding-remove-top ' + (usedBy
|
||||
== 'deposit' ? ' uk-padding-remove-top ' : ' '))"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light">
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light">
|
||||
<div style="box-sizing: border-box; "
|
||||
[class]="' uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom uk-flex uk-flex-middle uk-background-fixed '+searchFormClass
|
||||
+ (usedBy != 'deposit' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
|
||||
' searchFormMinHeight uk-padding-remove-bottom uk-section ' : '')
|
||||
+(simpleView?'':' advancedSearchFormBackground ')">
|
||||
|
||||
<div [class]="(usedBy!='deposit' && (!customFilter || customFilter.queryFieldName != 'communityId'))?'uk-position-cover':''" ></div>
|
||||
<div
|
||||
[class]="(usedBy!='deposit' && (!customFilter || customFilter.queryFieldName != 'communityId'))?'uk-position-cover':''"></div>
|
||||
<div class="uk-width-1-1">
|
||||
<breadcrumbs *ngIf="showBreadcrumb && entityType!='community'"
|
||||
addClass=" uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
addClass=" uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top"
|
||||
[breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
<div class="uk-position-relative">
|
||||
<div [class]="'uk-container '+(customFilter && customFilter.queryFieldName ==
|
||||
'communityId'?' uk-margin-large-bottom ':'uk-margin-large-top')+
|
||||
(entityType === 'community' ||entityType === 'funder'?' uk-position-relative':'')" id="searchForm">
|
||||
(entityType === 'community' ||entityType === 'stakeholder'?' uk-position-relative':'')" id="searchForm">
|
||||
<advanced-search-form
|
||||
[entityType] = "entityType"
|
||||
[entityType]="entityType"
|
||||
[fieldIds]="fieldIds"
|
||||
[fieldIdsMap]="fieldIdsMap"
|
||||
[selectedFields]="selectedFields"
|
||||
|
@ -124,7 +144,7 @@
|
|||
[showAdvancedSearchLink]="showAdvancedSearchLink" [customFilter]="customFilter"
|
||||
>
|
||||
</advanced-search-form>
|
||||
<div *ngIf="entityType === 'community' ||entityType === 'funder' " class="uk-position-center-right">
|
||||
<div *ngIf="entityType === 'community' ||entityType === 'stakeholder' " class="uk-position-center-right">
|
||||
<img src="assets/common-assets/common/search.png" class="uk-align-center" width="141" height="171">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -136,23 +156,24 @@
|
|||
[searchAction]=false></schema2jsonld>
|
||||
|
||||
|
||||
|
||||
<div id="tm-main" class=" tm-middle">
|
||||
<div uk-grid>
|
||||
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
||||
<!-- <breadcrumbs *ngIf="showBreadcrumb && entityType!='community'"-->
|
||||
<!-- addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs>-->
|
||||
<!-- <breadcrumbs *ngIf="showBreadcrumb && entityType!='community'"-->
|
||||
<!-- addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs>-->
|
||||
<div class="uk-container uk-container-large">
|
||||
<div>
|
||||
<breadcrumbs *ngIf="showBreadcrumb && entityType=='community'"
|
||||
addClass=" " [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<div [class]="(showRefine)? 'uk-width-4-5@m uk-width-4-5@l uk-width-1-1@s' :'uk-width-1-1'">
|
||||
<div *ngIf="showRefine" class="uk-offcanvas-content uk-hidden@m uk-margin-top">
|
||||
|
||||
<a href="#offcanvas-usage" uk-toggle>
|
||||
<span class="uk-icon uk-margin-small-right uk-margin-small-left">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="settings">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
||||
data-svg="settings">
|
||||
<ellipse fill="none" stroke="#000" cx="6.11" cy="3.55" rx="2.11" ry="2.15"></ellipse>
|
||||
<ellipse fill="none" stroke="#000" cx="6.11" cy="15.55" rx="2.11" ry="2.15"></ellipse>
|
||||
<circle fill="none" stroke="#000" cx="13.15" cy="9.55" r="2.15"></circle>
|
||||
|
@ -164,14 +185,16 @@
|
|||
<rect x="10" y="15" width="8" height="1"></rect>
|
||||
</svg>
|
||||
</span>
|
||||
<span>Filters <span *ngIf="(selectedRangeFilters+selectedFilters) > 0">({{(selectedRangeFilters+selectedFilters)}})</span></span>
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1">-->
|
||||
<!-- <rect x="6" y="4" width="12" height="1"></rect><rect x="6" y="9" width="12" height="1"></rect>-->
|
||||
<!-- <rect x="6" y="14" width="12" height="1"></rect>-->
|
||||
<!-- <rect x="2" y="4" width="2" height="1"></rect>-->
|
||||
<!-- <rect x="2" y="9" width="2" height="1"></rect>-->
|
||||
<!-- <rect x="2" y="14" width="2" height="1"></rect>-->
|
||||
<!-- </svg>-->
|
||||
<span>Filters <span
|
||||
*ngIf="(selectedRangeFilters+selectedFilters) > 0">({{(selectedRangeFilters + selectedFilters)}}
|
||||
)</span></span>
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1">-->
|
||||
<!-- <rect x="6" y="4" width="12" height="1"></rect><rect x="6" y="9" width="12" height="1"></rect>-->
|
||||
<!-- <rect x="6" y="14" width="12" height="1"></rect>-->
|
||||
<!-- <rect x="2" y="4" width="2" height="1"></rect>-->
|
||||
<!-- <rect x="2" y="9" width="2" height="1"></rect>-->
|
||||
<!-- <rect x="2" y="14" width="2" height="1"></rect>-->
|
||||
<!-- </svg>-->
|
||||
</a>
|
||||
|
||||
<div #offcanvas_element id="offcanvas-usage" uk-offcanvas overlay style="z-index:10000;">
|
||||
|
@ -179,101 +202,101 @@
|
|||
<button class="uk-offcanvas-close" type="button" uk-close></button>
|
||||
<div class="uk-width-1-1">
|
||||
|
||||
<!-- <span *ngIf="tableViewLink " class="uk-width-expand">-->
|
||||
<!-- <span *ngIf="tableViewLink">-->
|
||||
<!-- <a uk-tooltip="title: Table view" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >-->
|
||||
<!-- <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span uk-tooltip="title: List view" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && ( entityType !=-->
|
||||
<!-- 'community' && entityType != 'funder') && usedBy == 'search'"-->
|
||||
<!-- class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
|
||||
<!-- </search-download>-->
|
||||
<!-- <span *ngIf="tableViewLink " class="uk-width-expand">-->
|
||||
<!-- <span *ngIf="tableViewLink">-->
|
||||
<!-- <a uk-tooltip="title: Table view" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >-->
|
||||
<!-- <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span uk-tooltip="title: List view" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && ( entityType !=-->
|
||||
<!-- 'community' && entityType != 'stakeholder') && usedBy == 'search'"-->
|
||||
<!-- class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
|
||||
<!-- </search-download>-->
|
||||
|
||||
<!-- HERE-->
|
||||
<!-- <div *ngIf="selectedRangeFilters > 0 || selectedFilters > 0" class="uk-margin-top uk-margin-small-bottom">-->
|
||||
<!--<!– <div class="uk-grid uk-margin-bottom uk-margin-top">–>-->
|
||||
<!--<!– <span class="uk-text-bold uk-text-large">Filters</span>–>-->
|
||||
<!--<!– <a *ngIf="selectedFilters>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">–>-->
|
||||
<!--<!– Clear All–>-->
|
||||
<!--<!– </a>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- <div class="uk-grid uk-flex uk-flex-bottom">-->
|
||||
<!-- <h5 class="uk-text-bold">Filters</h5>-->
|
||||
<!-- <a *ngIf="(selectedRangeFilters+selectedFilters)>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">-->
|
||||
<!-- Clear All-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- HERE-->
|
||||
<!-- <div *ngIf="selectedRangeFilters > 0 || selectedFilters > 0" class="uk-margin-top uk-margin-small-bottom">-->
|
||||
<!--<!– <div class="uk-grid uk-margin-bottom uk-margin-top">–>-->
|
||||
<!--<!– <span class="uk-text-bold uk-text-large">Filters</span>–>-->
|
||||
<!--<!– <a *ngIf="selectedFilters>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">–>-->
|
||||
<!--<!– Clear All–>-->
|
||||
<!--<!– </a>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- <div class="uk-grid uk-flex uk-flex-bottom">-->
|
||||
<!-- <h5 class="uk-text-bold">Filters</h5>-->
|
||||
<!-- <a *ngIf="(selectedRangeFilters+selectedFilters)>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">-->
|
||||
<!-- Clear All-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div *ngIf="selectedRangeFilters > 0 || selectedFilters>0" class="uk-margin-medium-bottom uk-grid uk-grid-small uk-text-small" uk-grid>-->
|
||||
<!-- <ng-container *ngIf="selectedRangeFilters > 0">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.selectedFromAndToValues">-->
|
||||
<!-- <span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.countSelectedValues > 0">-->
|
||||
<!-- <div *ngIf="selectedRangeFilters > 0 || selectedFilters>0" class="uk-margin-medium-bottom uk-grid uk-grid-small uk-text-small" uk-grid>-->
|
||||
<!-- <ng-container *ngIf="selectedRangeFilters > 0">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.selectedFromAndToValues">-->
|
||||
<!-- <span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.countSelectedValues > 0">-->
|
||||
|
||||
<!-- <!– <span class="uk-text-bold">{{filter.title}}:</span>–>-->
|
||||
<!-- <!– uk-margin-small-top uk-margin-small-right–> <!– if no grid on the div above, add it –>-->
|
||||
<!-- <!– uk-label –>-->
|
||||
<!-- <span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "-->
|
||||
<!-- [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >-->
|
||||
<!-- <!– if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span –>-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <!– <span class="uk-text-bold">{{filter.title}}:</span>–>-->
|
||||
<!-- <!– uk-margin-small-top uk-margin-small-right–> <!– if no grid on the div above, add it –>-->
|
||||
<!-- <!– uk-label –>-->
|
||||
<!-- <span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "-->
|
||||
<!-- [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >-->
|
||||
<!-- <!– if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span –>-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!--<!– <div class="uk-margin-small-bottom uk-margin-small-top uk-grid">–>-->
|
||||
<!--<!– <a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!--<!– <div class="uk-margin-small-bottom uk-margin-small-top uk-grid">–>-->
|
||||
<!--<!– <a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
|
||||
<!-- <div *ngIf="filters.length === 0 && searchUtils.keyword.length === 0 && results.length > 0" class="uk-margin-top">-->
|
||||
<!-- <span class="uk-text-meta">No filters available</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul *ngIf="!showUnknownFilters" class="uk-list uk-list-divider">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters">-->
|
||||
<!-- <li>-->
|
||||
<!-- <range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters ">-->
|
||||
<!-- <li *ngIf= "filter.values.length >0">-->
|
||||
<!-- <search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ul>-->
|
||||
<!-- <div *ngIf="filters.length === 0 && searchUtils.keyword.length === 0 && results.length > 0" class="uk-margin-top">-->
|
||||
<!-- <span class="uk-text-meta">No filters available</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul *ngIf="!showUnknownFilters" class="uk-list uk-list-divider">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters">-->
|
||||
<!-- <li>-->
|
||||
<!-- <range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters ">-->
|
||||
<!-- <li *ngIf= "filter.values.length >0">-->
|
||||
<!-- <search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ul>-->
|
||||
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
|
||||
<!-- END OF HERE-->
|
||||
<!-- END OF HERE-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -282,9 +305,11 @@
|
|||
</div>
|
||||
<div *ngIf="includeOnlyResultsAndFilter "
|
||||
class="uk-margin-medium-top uk-margin-medium-bottom">
|
||||
<a *ngIf ="showAdvancedSearchLink && advancedSearchLink" routerLinkActive="router-link-active"
|
||||
[routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)"
|
||||
[class]="(disableForms?' uk-disabled uk-link-muted ':'') +' portal-link uk-float-right '">Advanced search
|
||||
<a *ngIf="showAdvancedSearchLink && advancedSearchLink" routerLinkActive="router-link-active"
|
||||
[routerLink]="advancedSearchLink" style="z-index:1;"
|
||||
[queryParams]="this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)"
|
||||
[class]="(disableForms?' uk-disabled uk-link-muted ':'') +' portal-link uk-float-right '">Advanced
|
||||
search
|
||||
</a>
|
||||
<!-- <quick-selections [resultTypes]="resultTypes"
|
||||
(typeChange)="queryChanged()"
|
||||
|
@ -294,117 +319,121 @@
|
|||
</quick-selections>-->
|
||||
|
||||
</div>
|
||||
<div class="uk-grid helper-grid uk-padding-small uk-padding-remove-vertical uk-margin-large-bottom" >
|
||||
<div class="uk-grid helper-grid uk-padding-small uk-padding-remove-vertical uk-margin-large-bottom">
|
||||
<div *ngIf="showRefine" class="uk-width-1-4@m search-filters uk-visible@m">
|
||||
<!-- top: #container-1; bottom: #true; -->
|
||||
<!-- <div id="container-1" style="z-index: -1;" uk-sticky="top: #container-1; offset: 120; "> -->
|
||||
<!-- <span *ngIf="tableViewLink" class="uk-width-expand">-->
|
||||
<!-- <span *ngIf="tableViewLink">-->
|
||||
<!-- <a uk-tooltip="title: Table view" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >-->
|
||||
<!-- <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span uk-tooltip="title: List view" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && ( entityType !=-->
|
||||
<!-- 'community' && entityType != 'funder') && usedBy == 'search'"-->
|
||||
<!-- class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
|
||||
<!-- </search-download>-->
|
||||
<!-- <span *ngIf="tableViewLink" class="uk-width-expand">-->
|
||||
<!-- <span *ngIf="tableViewLink">-->
|
||||
<!-- <a uk-tooltip="title: Table view" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >-->
|
||||
<!-- <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span uk-tooltip="title: List view" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && ( entityType !=-->
|
||||
<!-- 'community' && entityType != 'stakeholder') && usedBy == 'search'"-->
|
||||
<!-- class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
|
||||
<!-- </search-download>-->
|
||||
|
||||
<!-- HERE-->
|
||||
<!-- <div *ngIf="selectedRangeFilters > 0 || selectedFilters > 0" class="uk-width-1-1 uk-margin-top uk-margin-medium-bottom ">-->
|
||||
<!-- <div class="uk-grid uk-flex uk-flex-bottom">-->
|
||||
<!-- <h5 class="uk-text-bold">Filters</h5>-->
|
||||
<!-- <a *ngIf="(selectedRangeFilters+selectedFilters)>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">-->
|
||||
<!-- Clear All-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– uk-grid uk-grid-small" uk-grid–>-->
|
||||
<!-- <!– uk-margin-left–>-->
|
||||
<!-- <div class="uk-grid uk-grid-small uk-text-small" uk-grid>-->
|
||||
<!-- <ng-container *ngIf="selectedRangeFilters > 0">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.selectedFromAndToValues">-->
|
||||
<!-- <span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.countSelectedValues > 0">-->
|
||||
<!-- HERE-->
|
||||
<!-- <div *ngIf="selectedRangeFilters > 0 || selectedFilters > 0" class="uk-width-1-1 uk-margin-top uk-margin-medium-bottom ">-->
|
||||
<!-- <div class="uk-grid uk-flex uk-flex-bottom">-->
|
||||
<!-- <h5 class="uk-text-bold">Filters</h5>-->
|
||||
<!-- <a *ngIf="(selectedRangeFilters+selectedFilters)>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">-->
|
||||
<!-- Clear All-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– uk-grid uk-grid-small" uk-grid–>-->
|
||||
<!-- <!– uk-margin-left–>-->
|
||||
<!-- <div class="uk-grid uk-grid-small uk-text-small" uk-grid>-->
|
||||
<!-- <ng-container *ngIf="selectedRangeFilters > 0">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.selectedFromAndToValues">-->
|
||||
<!-- <span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters " >-->
|
||||
<!-- <ng-container *ngIf = "filter.countSelectedValues > 0">-->
|
||||
|
||||
<!-- <!– <span class="uk-text-bold">{{filter.title}}:</span>–>-->
|
||||
<!-- <!– uk-margin-small-top uk-margin-small-right–> <!– if no grid on the div above, add it –>-->
|
||||
<!-- <!– uk-label –>-->
|
||||
<!-- <span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "-->
|
||||
<!-- [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >-->
|
||||
<!-- <!– if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span –>-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– <span class="uk-text-bold">{{filter.title}}:</span>–>-->
|
||||
<!-- <!– uk-margin-small-top uk-margin-small-right–> <!– if no grid on the div above, add it –>-->
|
||||
<!-- <!– uk-label –>-->
|
||||
<!-- <span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "-->
|
||||
<!-- [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >-->
|
||||
<!-- <!– if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span –>-->
|
||||
<!-- <span class="selectedFilterLabel ">-->
|
||||
<!-- <a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">-->
|
||||
<!-- <span class=" clickable" aria-hidden="true">-->
|
||||
<!-- <span class="uk-icon">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <!– <div class="uk-margin-small-bottom uk-margin-small-top uk-grid">–>-->
|
||||
<!-- <!– <a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>–>-->
|
||||
<!-- <!– </div>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="filters.length === 0 && results.length > 0" class="uk-margin-top">-->
|
||||
<!-- <span class="uk-text-meta">No filters available</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul *ngIf="!showUnknownFilters"-->
|
||||
<!-- [class]="'uk-list uk-list-divider' + (selectedRangeFilters == 0 && selectedFilters == 0 ? ' uk-margin-small-top' : '')">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters">-->
|
||||
<!-- <li>-->
|
||||
<!-- <range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters ">-->
|
||||
<!-- <li *ngIf= "filter.values.length >0">-->
|
||||
<!-- <search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ul>-->
|
||||
<!-- <!– <div class="uk-margin-small-bottom uk-margin-small-top uk-grid">–>-->
|
||||
<!-- <!– <a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>–>-->
|
||||
<!-- <!– </div>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="filters.length === 0 && results.length > 0" class="uk-margin-top">-->
|
||||
<!-- <span class="uk-text-meta">No filters available</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul *ngIf="!showUnknownFilters"-->
|
||||
<!-- [class]="'uk-list uk-list-divider' + (selectedRangeFilters == 0 && selectedFilters == 0 ? ' uk-margin-small-top' : '')">-->
|
||||
<!-- <ng-container *ngFor="let filter of rangeFilters">-->
|
||||
<!-- <li>-->
|
||||
<!-- <range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- <ng-container *ngFor="let filter of filters ">-->
|
||||
<!-- <li *ngIf= "filter.values.length >0">-->
|
||||
<!-- <search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </ul>-->
|
||||
<!--context: { dynamic_content: getDynamicContent(share_research_results_type) }">-->
|
||||
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
|
||||
<!-- END OF HERE-->
|
||||
<!-- END OF HERE-->
|
||||
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-with-1-1@s">
|
||||
<div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !loadPaging )"> <a
|
||||
<div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !loadPaging )"><a
|
||||
class="uk-margin-top uk-button uk-button-text"
|
||||
[href]="openaireLink+this.routerHelper.createQueryParamsString(this.parameterNames, this.parameterValues)"
|
||||
target="_blank" >Results in OpenAIRE</a></div>
|
||||
target="_blank">Results in OpenAIRE</a></div>
|
||||
<div class="uk-align-center uk-margin-remove-bottom">
|
||||
<div *ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)"
|
||||
<div
|
||||
*ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)"
|
||||
class="uk-grid uk-margin-top uk-margin-bottom">
|
||||
<div class="uk-width-expand@m uk-grid uk-grid-medium uk-margin-small-bottom">
|
||||
<search-results-per-page [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
|
||||
<search-sorting *ngIf="sort" [entityType]="entityType" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
|
||||
<search-results-per-page [(size)]="searchUtils.size"
|
||||
(sizeChange)="sizeChanged($event)"></search-results-per-page>
|
||||
<search-sorting *ngIf="sort" [entityType]="entityType" [(sortBy)]="searchUtils.sortBy"
|
||||
(sortByChange)="sortByChanged($event)"></search-sorting>
|
||||
</div>
|
||||
<!-- uk-flex uk-flex-middle-->
|
||||
<!-- uk-flex uk-flex-middle-->
|
||||
<div class="uk-width-auto@m uk-margin-small-bottom">
|
||||
<!-- !showUnknownFilters && (searchUtils.totalResults > 0 || !loadPaging)-->
|
||||
<search-download *ngIf= "( entityType !='community' && entityType != 'funder') && usedBy == 'search'"
|
||||
<!-- !showUnknownFilters && (searchUtils.totalResults > 0 || !loadPaging)-->
|
||||
<search-download
|
||||
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
||||
[isDisabled]="disableForms"
|
||||
[type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">
|
||||
</search-download>
|
||||
|
@ -416,26 +445,29 @@
|
|||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
|
||||
Table view
|
||||
</a>
|
||||
<!– <span uk-tooltip="title: List view" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>–>
|
||||
<!– <span uk-tooltip="title: List view" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>–>
|
||||
</span>-->
|
||||
</div>
|
||||
</div>
|
||||
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "searchUtils.baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults"
|
||||
[(searchUtils)]="searchUtils" [(results)]="results" [(baseUrl)]="searchUtils.baseUrl"
|
||||
[(parameterNames)]="parameterNames"
|
||||
[(parameterValues)]="parameterValues"></search-paging>
|
||||
</div>
|
||||
|
||||
<!-- <search-download *ngIf= "( entityType !='community' && entityType != 'funder') && usedBy == 'search'"-->
|
||||
<!-- class="uk-width-1-1@s uk-hidden@m"-->
|
||||
<!-- [isDisabled]="disableForms"-->
|
||||
<!-- [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
|
||||
<!-- </search-download>-->
|
||||
<!-- <search-download *ngIf= "( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"-->
|
||||
<!-- class="uk-width-1-1@s uk-hidden@m"-->
|
||||
<!-- [isDisabled]="disableForms"-->
|
||||
<!-- [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
|
||||
<!-- </search-download>-->
|
||||
|
||||
<div *ngIf="(searchUtils.page <= pagingLimit)" class="uk-margin-large-bottom">
|
||||
<search-result *ngIf="( entityType !='community' && entityType != 'funder') && usedBy == 'search'"
|
||||
<search-result *ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
||||
[results]="results"
|
||||
[status]=searchUtils.status
|
||||
[type]="entityType"
|
||||
[showLoading]="true" [properties]=properties [showImpactFactors]="(customFilter &&
|
||||
customFilter.queryFieldName == 'communityId' && customFilter.valueId == 'elixir-gr')" >
|
||||
customFilter.queryFieldName == 'communityId' && customFilter.valueId == 'elixir-gr')">
|
||||
</search-result>
|
||||
<deposit-result *ngIf="usedBy == 'deposit'"
|
||||
[results]="results"
|
||||
|
@ -444,27 +476,31 @@
|
|||
[zenodoInformation]="zenodoInformation"
|
||||
[properties]=properties>
|
||||
</deposit-result>
|
||||
<community-search-result *ngIf="(entityType == 'community' || entityType == 'funder') &&
|
||||
usedBy == 'search'"
|
||||
<portal-search-result
|
||||
*ngIf="(entityType == 'community' || entityType == 'stakeholder') && usedBy == 'search'"
|
||||
[results]="results"
|
||||
[status]="searchUtils.status"
|
||||
[type]="entityType"
|
||||
[showType]="false"
|
||||
[showLoading]="true" [properties]=properties>
|
||||
</community-search-result>
|
||||
</portal-search-result>
|
||||
</div>
|
||||
|
||||
<div [class]="searchUtils.page > pagingLimit ? 'search-results' : ''" *ngIf="(searchUtils.page >= pagingLimit) && (searchUtils.totalResults > searchUtils.size*pagingLimit)">
|
||||
<div [class]="searchUtils.page > pagingLimit ? 'search-results' : ''"
|
||||
*ngIf="(searchUtils.page >= pagingLimit) && (searchUtils.totalResults > searchUtils.size*pagingLimit)">
|
||||
<p class="uk-alert-warning" uk-alert>For more results please try a new, more specific query</p>
|
||||
</div>
|
||||
|
||||
<div class="uk-align-center uk-margin-remove-bottom">
|
||||
<!-- <div *ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)"-->
|
||||
<!-- class="uk-grid uk-margin-top uk-margin-bottom">-->
|
||||
<!-- <search-results-per-page class="uk-width-1-2@m uk-width-1-1" [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>-->
|
||||
<!-- <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>-->
|
||||
<!-- </div>-->
|
||||
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "searchUtils.baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
<!-- <div *ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)"-->
|
||||
<!-- class="uk-grid uk-margin-top uk-margin-bottom">-->
|
||||
<!-- <search-results-per-page class="uk-width-1-2@m uk-width-1-1" [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>-->
|
||||
<!-- <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>-->
|
||||
<!-- </div>-->
|
||||
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults"
|
||||
[(searchUtils)]="searchUtils" [(results)]="results" [(baseUrl)]="searchUtils.baseUrl"
|
||||
[(parameterNames)]="parameterNames"
|
||||
[(parameterValues)]="parameterValues"></search-paging>
|
||||
</div>
|
||||
|
||||
<a *ngIf="properties.showLastIndexInformationLink && lastIndex"
|
||||
|
@ -473,13 +509,14 @@
|
|||
Last index information
|
||||
</a>
|
||||
</div>
|
||||
<!-- <div class="uk-visible@m uk-margin-top uk-width-1-5">-->
|
||||
<!-- <search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="uk-visible@m uk-margin-top uk-width-1-5">-->
|
||||
<!-- <search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>-->
|
||||
<!-- </div>-->
|
||||
<!-- <helper *ngIf="searchUtils.totalResults > csvLimit" class="uk-margin-top helper-left-right uk-visible@m" position="right"></helper> -->
|
||||
</div>
|
||||
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']"></helper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@ import {HelperModule} from '../../utils/helper/helper.module';
|
|||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
|
||||
import {SearchDataproviderMapModule} from './searchDataproviderMap.module';
|
||||
import {CommunitySearchResultsModule} from "./communitySearchResults.module";
|
||||
import {PortalSearchResultModule} from "./portal-search-result.module";
|
||||
import {SearchResultsModule} from "./searchResults.module";
|
||||
import {SearchResultsInDepositModule} from "../../deposit/searchResultsInDeposit.module";
|
||||
import {AdvancedSearchFormModule} from "./advancedSearchForm.module";
|
||||
|
@ -29,7 +29,7 @@ import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, SearchFormModule, SearchResultsModule, CommunitySearchResultsModule,
|
||||
CommonModule, FormsModule, RouterModule, SearchFormModule, SearchResultsModule, PortalSearchResultModule,
|
||||
LoadingModalModule, ReportsServiceModule, SearchDataproviderMapModule,
|
||||
SearchPagingModule, SearchResultsPerPageModule, SearchSortingModule, SearchDownloadModule, ModalModule,
|
||||
SearchFilterModule, RangeFilterModule,
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
<ul [class]="'uk-list uk-margin ' + custom_class" uk-height-match="target: .portalSearchCard; row: false">
|
||||
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
||||
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto">
|
||||
<div class="portalSearchCard uk-position-relative">
|
||||
<div class="badges">
|
||||
<div *ngIf="result.isSubscribed"
|
||||
class="portal-card-badge uk-text-center">
|
||||
<span>Subscribed</span>
|
||||
</div>
|
||||
<div *ngIf="type === 'community' && result.status == 'manager'"
|
||||
class="private-card-badge uk-text-center ">
|
||||
<span>Private</span>
|
||||
</div>
|
||||
<div *ngIf="type === 'stakeholder' && !result.isPublic"
|
||||
class="private-card-badge uk-text-center ">
|
||||
<span>Private</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-grid uk-flex uk-flex-middle" uk-grid>
|
||||
<a *ngIf="directLink" [href]="(type === 'community')?getCommunityPageUrl(result):getStakeholderPageUrl(result)"
|
||||
target="_blank"
|
||||
class="uk-width-1-5">
|
||||
<div>
|
||||
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
|
||||
alt="{{(result.title)?result.title:result.shortTitle}} logo">
|
||||
<span *ngIf="result.logoUrl == null || result.logoUrl == ''" class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
cx="7.7" cy="8.6"
|
||||
r="3.5"></circle> <path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<a *ngIf="!directLink"
|
||||
class="uk-width-1-5"
|
||||
(click)="confirmModalOpen(result)">
|
||||
<div>
|
||||
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
|
||||
alt="{{(result.title)?result.title:result.shortTitle}} logo">
|
||||
<span *ngIf="(result.logoUrl == null || result.logoUrl == '' )" class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
cx="7.7" cy="8.6"
|
||||
r="3.5"></circle> <path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.1"
|
||||
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<div class="uk-width-expand">
|
||||
<div *ngIf="type === 'community'" [title]=result.shortTitle class="uk-text-large uk-grid">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
|
||||
[class]="(result.isManager)?'uk-width-3-4 portal-link':'portal-link'">
|
||||
{{(result.title) ? result.title : result.shortTitle}}
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''"
|
||||
class="portal-link">
|
||||
{{(result.title) ? result.title : result.shortTitle}}
|
||||
</a>
|
||||
<manage *ngIf="result.isManager" [communityId]="result.communityId"
|
||||
class="uk-width-expand uk-margin-auto-right"></manage>
|
||||
</div>
|
||||
<div *ngIf="type === 'stakeholder'" [title]=result.index_shortName class="uk-text-large uk-grid">
|
||||
<a *ngIf="directLink" [href]="getStakeholderPageUrl(result)" target="_blank"
|
||||
[class]="(result.isManager)?'uk-width-3-4 portal-link':'portal-link'">
|
||||
{{(result.name) ? result.name : result.index_shortName}}
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''"
|
||||
class="portal-link">
|
||||
{{(result.title) ? result.title : result.shortTitle}}
|
||||
</a>
|
||||
<manage *ngIf="result.isManager" [alias]="result.alias" [properties]="properties"
|
||||
class="uk-width-expand uk-margin-auto-right"></manage>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-text-small">
|
||||
<span class="uk-text-muted" *ngIf="result.date || result.creationDate">Creation Date:</span>
|
||||
<span class="space" *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
||||
<span class="space" *ngIf="result.creationDate">{{result.creationDate | date:'dd-MM-yyyy'}}</span>
|
||||
<span *ngIf="type === 'community' && showType && result.type && result.type != ''" class="uk-margin-left">
|
||||
<span class="uk-text-muted">Type:</span>
|
||||
<span
|
||||
class="space uk-text-capitalize">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>
|
||||
</span>
|
||||
<span *ngIf="type === 'stakeholder' && result.type && result.type != ''" class="uk-margin-left">
|
||||
<span class="uk-text-muted">Type:</span>
|
||||
<span
|
||||
class="space uk-text-capitalize">{{(result.type == 'ri') ? 'research initiative' : result.type}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="result.description">
|
||||
<div class="text-justify descriptionText uk-text-small uk-text-muted uk-margin-auto-right"
|
||||
[title]="result.description">
|
||||
{{_formatDescription(result.description)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<modal-alert #AlertModal (alertOutput)="goToPage($event)">
|
||||
<div class="uk-text-left">
|
||||
You will be navigated to a new tab. Are you sure that you want to proceed?
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
import {Component, Input, ViewChild} from '@angular/core';
|
||||
import {Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild} from '@angular/core';
|
||||
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
||||
import {RouterHelper} from '../../utils/routerHelper.class';
|
||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||
import {CommunityInfo} from "../../connect/community/communityInfo";
|
||||
import {Router} from "@angular/router";
|
||||
import {LocalStorageService} from "../../services/localStorage.service";
|
||||
import {Stakeholder, StakeholderInfo} from "../../monitor/entities/stakeholder";
|
||||
|
||||
@Component({
|
||||
selector: 'community-search-result',
|
||||
templateUrl: 'communitySearchResults.component.html'
|
||||
selector: 'portal-search-result',
|
||||
templateUrl: 'portal-search-result.component.html'
|
||||
})
|
||||
|
||||
export class CommunitySearchResultsComponent {
|
||||
@Input() results: CommunityInfo[];
|
||||
export class PortalSearchResultComponent implements OnInit, OnChanges{
|
||||
@Input() results: (CommunityInfo & StakeholderInfo)[];
|
||||
@Input() status: number;
|
||||
@Input() type: string;
|
||||
@Input() showType = false;
|
||||
|
@ -27,7 +28,7 @@ export class CommunitySearchResultsComponent {
|
|||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public errorMessage: string = "No results found";
|
||||
public selectedCommunityId: string;
|
||||
public selected: CommunityInfo & Stakeholder;
|
||||
public directLink: boolean = true;
|
||||
|
||||
|
||||
|
@ -41,6 +42,10 @@ export class CommunitySearchResultsComponent {
|
|||
});
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
console.log(changes);
|
||||
}
|
||||
|
||||
getProductionPrefix(): string {
|
||||
// return (this.properties.environment == "beta") ? "beta." : "";
|
||||
return "beta.";
|
||||
|
@ -55,12 +60,15 @@ export class CommunitySearchResultsComponent {
|
|||
return (((description).length > this.maxCharacters) ? (description.substring(0, (this.maxCharacters - ('...').length)) + "...") : description);
|
||||
}
|
||||
|
||||
public confirmModalOpen(community: CommunityInfo) {
|
||||
this.selectedCommunityId = (this.type == 'community')? community.communityId:community['alias'];
|
||||
public confirmModalOpen(result: CommunityInfo & Stakeholder) {
|
||||
this.selected = result;
|
||||
this.modal.cancelButton = true;
|
||||
this.modal.okButton = true;
|
||||
this.modal.alertTitle = 'You are going to visit ' +
|
||||
((community.title) ? community.title : community.shortTitle) + (this.type == 'community')? ' Gateway':' Monitor Dashboard';
|
||||
if(this.type === 'stakeholder') {
|
||||
this.modal.alertTitle = 'You are going to visit ' + result.name + ' Monitor Dashboard';
|
||||
} else if (this.type === 'community') {
|
||||
this.modal.alertTitle = 'You are going to visit ' + ((result.title) ? result.title : result.shortTitle) +' Gateway';
|
||||
}
|
||||
this.modal.alertMessage = false;
|
||||
this.modal.okButtonLeft = false;
|
||||
this.modal.okButtonText = 'Yes';
|
||||
|
@ -69,36 +77,31 @@ export class CommunitySearchResultsComponent {
|
|||
this.modal.open();
|
||||
}
|
||||
|
||||
public getCommunityPageUrl(entity): string {
|
||||
public getCommunityPageUrl(communityInfo: CommunityInfo): string {
|
||||
let url = '';
|
||||
if (this.isProduction()) {
|
||||
url = 'https://' + this.getProductionPrefix() + entity.communityId + '.openaire.eu';
|
||||
url = 'https://' + this.getProductionPrefix() + communityInfo.communityId + '.openaire.eu';
|
||||
} else {
|
||||
url = this.router.createUrlTree(['/'], {
|
||||
queryParams: {'communityId': entity.communityId}
|
||||
queryParams: {'communityId': communityInfo.communityId}
|
||||
}).toString();
|
||||
}
|
||||
if(this.type == 'funder'){
|
||||
url = "http://dl170.madgik.di.uoa.gr/monitor/dashboard/"+entity.alias;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
public goToCommunityPage(data: any) {
|
||||
public getStakeholderPageUrl(stakeholder: Stakeholder) {
|
||||
return this.properties.baseLink + '/dashboard/' + stakeholder.alias;
|
||||
}
|
||||
|
||||
public goToPage(data: any) {
|
||||
if (data.value == true) {
|
||||
this.localStorageService.setCommunityDirectLink(data.choice);
|
||||
let url = '';
|
||||
if (this.isProduction()) {
|
||||
url = 'https://' + this.getProductionPrefix() + this.selectedCommunityId + '.openaire.eu';
|
||||
} else {
|
||||
url = this.router.createUrlTree(['/'], {
|
||||
queryParams: {'communityId': this.selectedCommunityId}
|
||||
}).toString();
|
||||
if (this.type === 'stakeholder') {
|
||||
url = this.getStakeholderPageUrl(this.selected);
|
||||
} else if (this.type === 'community') {
|
||||
url = this.getCommunityPageUrl(this.selected);
|
||||
}
|
||||
if(this.type == 'funder'){
|
||||
url = "http://dl170.madgik.di.uoa.gr/monitor/dashboard/"+this.selectedCommunityId;
|
||||
}
|
||||
console.log(url)
|
||||
this.localStorageService.setCommunityDirectLink(data.choice);
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {ErrorMessagesModule} from '../../utils/errorMessages.module';
|
||||
import {CommunitySearchResultsComponent} from "./communitySearchResults.component";
|
||||
import {PortalSearchResultComponent} from "./portal-search-result.component";
|
||||
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||
import {ManageModule} from "../../utils/manage/manage.module";
|
||||
|
||||
|
@ -14,12 +14,12 @@ import {ManageModule} from "../../utils/manage/manage.module";
|
|||
AlertModalModule, ManageModule
|
||||
],
|
||||
declarations: [
|
||||
CommunitySearchResultsComponent
|
||||
PortalSearchResultComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
CommunitySearchResultsComponent
|
||||
PortalSearchResultComponent
|
||||
]
|
||||
})
|
||||
export class CommunitySearchResultsModule { }
|
||||
export class PortalSearchResultModule { }
|
|
@ -198,8 +198,7 @@
|
|||
<search-paging *ngIf="searchUtils.totalResults == 1" [type]="entityType" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues"></search-paging>
|
||||
</div>
|
||||
<div *ngIf="(searchUtils.page <= pagingLimit)" class="">
|
||||
<search-result *ngIf="(entityType != 'community' && entityType != 'funder' ) && !tableView &&
|
||||
usedBy == 'search'"
|
||||
<search-result *ngIf="(entityType != 'community' && entityType != 'funder' ) && !tableView && usedBy == 'search'"
|
||||
[results]="results"
|
||||
[status]="searchUtils.status"
|
||||
[type]="entityType"
|
||||
|
@ -212,14 +211,13 @@
|
|||
[zenodoInformation]="zenodoInformation"
|
||||
[properties]=properties>
|
||||
</deposit-result>
|
||||
<community-search-result *ngIf="(entityType == 'community' || entityType == 'funder') && !tableView &&
|
||||
usedBy == 'search'"
|
||||
<portal-search-result *ngIf="(entityType == 'community' || entityType == 'stakeholder') && !tableView && usedBy == 'search'"
|
||||
[results]="results"
|
||||
[status]="searchUtils.status"
|
||||
[type]="entityType"
|
||||
[showType]="showType"
|
||||
[showLoading]="true" [properties]=properties>
|
||||
</community-search-result>
|
||||
</portal-search-result>
|
||||
</div>
|
||||
|
||||
<div [class]="searchUtils.page > pagingLimit ? 'search-results' : ''" *ngIf="(searchUtils.page >= pagingLimit) && (searchUtils.totalResults > searchUtils.size*pagingLimit)">
|
||||
|
|
|
@ -19,14 +19,14 @@ import {HelperModule} from '../../utils/helper/helper.module';
|
|||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
|
||||
import { SearchDataproviderMapModule } from './searchDataproviderMap.module';
|
||||
import {CommunitySearchResultsModule} from "./communitySearchResults.module";
|
||||
import {PortalSearchResultModule} from "./portal-search-result.module";
|
||||
import {SearchResultsModule} from "./searchResults.module";
|
||||
import {SearchResultsInDepositModule} from "../../deposit/searchResultsInDeposit.module";
|
||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, SearchFormModule, SearchResultsModule, CommunitySearchResultsModule,
|
||||
CommonModule, FormsModule, RouterModule, SearchFormModule, SearchResultsModule, PortalSearchResultModule,
|
||||
LoadingModalModule, ReportsServiceModule, SearchDataproviderMapModule,
|
||||
SearchPagingModule, SearchResultsPerPageModule, SearchSortingModule, SearchDownloadModule, ModalModule, SearchFilterModule, PiwikServiceModule, HelperModule, Schema2jsonldModule, SEOServiceModule, SearchResultsModule,
|
||||
SearchResultsInDepositModule, BreadcrumbsModule
|
||||
|
|
|
@ -6,7 +6,7 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
|
|||
<div>
|
||||
<mat-form-field class="matSelectionFormField">
|
||||
<mat-label>Sort by:</mat-label>
|
||||
<mat-select *ngIf="(entityType != 'community' && entityType != 'funder' )"
|
||||
<mat-select *ngIf="(entityType != 'community' && entityType != 'stakeholder' )"
|
||||
[(ngModel)]="sortBy" (ngModelChange)="sortByChanged()"
|
||||
[disableOptionCentering]="true"
|
||||
panelClass="matSelectionPanel"
|
||||
|
@ -16,7 +16,7 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
|
|||
<mat-option value="resultdateofacceptance,ascending">Date (least recent)</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<mat-select *ngIf="(entityType == 'community' || entityType == 'funder')"
|
||||
<mat-select *ngIf="(entityType == 'community' || entityType == 'stakeholder')"
|
||||
class="uk-text-bold matSelection"
|
||||
id="form-horizontal-select" name="select_results_per_page"
|
||||
[(ngModel)]="sortBy" (ngModelChange)="sortByChanged()"
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
import { Component, Input} from '@angular/core';
|
||||
import {EnvProperties} from "../properties/env-properties";
|
||||
@Component({
|
||||
selector: 'manage',
|
||||
template: `
|
||||
<a [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId"
|
||||
<a *ngIf="communityId" [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId"
|
||||
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'"
|
||||
target="_blank">
|
||||
Manage
|
||||
</a>
|
||||
<a *ngIf="alias" [href]="properties.baseLink + '/dashboard/admin/' + alias"
|
||||
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'"
|
||||
target="_blank">
|
||||
Manage
|
||||
|
@ -12,6 +18,8 @@ import { Component, Input} from '@angular/core';
|
|||
|
||||
export class ManageComponent {
|
||||
@Input() communityId:string;
|
||||
@Input() alias: string;
|
||||
@Input() buttonSizeSmall = true;
|
||||
@Input() properties: EnvProperties;
|
||||
constructor() {}
|
||||
}
|
||||
|
|
|
@ -12,104 +12,489 @@ export class SearchFields {
|
|||
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
||||
public RESULT_REFINE_FIELDS = [
|
||||
"relfunder",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||
"relproject",
|
||||
"resultbestaccessright", "instancetypename", "resultlanguagename", "community","resulthostingdatasource" ];
|
||||
"resultbestaccessright", "instancetypename", "resultlanguagename", "community", "resulthostingdatasource"];
|
||||
|
||||
public RESULT_ADVANCED_FIELDS:string[] = ["q","resulttitle","resultauthor", "authorid","resultdescription","resultsubject","resultpublisher",
|
||||
"resultbestaccessright","community","collectedfromdatasourceid","resulthostingdatasourceid", "resultdateofacceptance",
|
||||
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "resultpublisher",
|
||||
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
|
||||
"relfunder",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"resultlanguagename", "relorganizationid", "pid","relprojectid", "instancetypename"];
|
||||
public RESULT_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["resulttitle"]:{name:"Title", type:"keyword", param:"title", operator: "tt", equalityOperator: "=", filterType: null},
|
||||
["resultauthor"]:{name:"Author", type:"keyword", param:"author", operator: "at", equalityOperator: "=", filterType: null},
|
||||
["authorid"]:{name:"Author ORCID", type:"keyword", param:"orcid", operator: "oc", equalityOperator: " exact ", filterType: null},
|
||||
["resultsubject"]:{name:"Subject", type:"keyword", param:"subject", operator: "sb", equalityOperator: "=", filterType: null},
|
||||
["resultdescription"]:{name:"Description", type:"keyword", param:"description", operator: "ds", equalityOperator: "=", filterType: null},
|
||||
["resultpublisher"]:{name:"Publisher", type:"keyword", param:"publisher", operator: "pb", equalityOperator: "=", filterType: null},
|
||||
["pid"]:{name:"PID", type:"keyword", param:"pid", operator: "pd", equalityOperator: " = ", filterType: null},
|
||||
["resulthostingdatasourceid"]:{name:"Hosting Content Provider", type:"entity", param:"hostedBy", operator: "hs", equalityOperator: " exact ", filterType: null},
|
||||
["resulthostingdatasource"]:{name:"Content Provider", type:"refine", param:"hostedBy", operator: "hs", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["instancetypename"]:{name:"Type", type:"vocabulary", param:"type", operator: "tp", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["resultlanguagename"]:{name:"Language", type:"vocabulary", param:"lang", operator: "ln", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["community"]:{name:"Community", type:"refine", param:"community", operator: "cm", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relproject"]:{name:"Project", type:"refine", param:"project", operator: "po", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relprojectid"]:{name:"Project", type:"entity", param:"project", operator: "po", equalityOperator: " exact ", filterType: null},
|
||||
["relfunder"]:{name:"Funder", type:"refine", param:"funder", operator: "fn", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relfundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", operator: "fn0", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relfundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", operator: "fn1", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relfundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", operator: "fn0", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["resultacceptanceyear"]:{name:"Publication Date", type:"keyword", param:"year", operator: "ya", equalityOperator: " = ", filterType: null},
|
||||
["resultdateofacceptance"]:{name:"Publication Date", type:"date", param:"date", operator: "dt", equalityOperator: " within ", filterType: null},
|
||||
["resultacceptanceyear-range-resultacceptanceyear"]:{name:"Year range", type:"keyword", param:"year", operator: "ya", equalityOperator: " within ", filterType: "range"},
|
||||
["resultbestaccessright"]:{name:"Access Mode", type:"vocabulary", param:"access", operator: "ac", equalityOperator: " exact ", filterType: "radio"},
|
||||
["collectedfrom"]:{name:"Collected From", type:"refine", param:"datasource", operator: "cl", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", operator: "og", equalityOperator: " exact ", filterType: null},
|
||||
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", operator: "cl", equalityOperator: " exact ", filterType: null},
|
||||
["resulttypeid"]:{name:"Result type", type:"refine", param:"types", operator: "tp", equalityOperator: " exact ", filterType: "radio"}
|
||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||
"resultlanguagename", "relorganizationid", "pid", "relprojectid", "instancetypename"];
|
||||
public RESULT_FIELDS: { [key: string]: FieldDetails } = {
|
||||
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["resulttitle"]: {
|
||||
name: "Title",
|
||||
type: "keyword",
|
||||
param: "title",
|
||||
operator: "tt",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["resultauthor"]: {
|
||||
name: "Author",
|
||||
type: "keyword",
|
||||
param: "author",
|
||||
operator: "at",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["authorid"]: {
|
||||
name: "Author ORCID",
|
||||
type: "keyword",
|
||||
param: "orcid",
|
||||
operator: "oc",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["resultsubject"]: {
|
||||
name: "Subject",
|
||||
type: "keyword",
|
||||
param: "subject",
|
||||
operator: "sb",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["resultdescription"]: {
|
||||
name: "Description",
|
||||
type: "keyword",
|
||||
param: "description",
|
||||
operator: "ds",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["resultpublisher"]: {
|
||||
name: "Publisher",
|
||||
type: "keyword",
|
||||
param: "publisher",
|
||||
operator: "pb",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " = ", filterType: null},
|
||||
["resulthostingdatasourceid"]: {
|
||||
name: "Hosting Content Provider",
|
||||
type: "entity",
|
||||
param: "hostedBy",
|
||||
operator: "hs",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["resulthostingdatasource"]: {
|
||||
name: "Content Provider",
|
||||
type: "refine",
|
||||
param: "hostedBy",
|
||||
operator: "hs",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["instancetypename"]: {
|
||||
name: "Type",
|
||||
type: "vocabulary",
|
||||
param: "type",
|
||||
operator: "tp",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["resultlanguagename"]: {
|
||||
name: "Language",
|
||||
type: "vocabulary",
|
||||
param: "lang",
|
||||
operator: "ln",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["community"]: {
|
||||
name: "Community",
|
||||
type: "refine",
|
||||
param: "community",
|
||||
operator: "cm",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relproject"]: {
|
||||
name: "Project",
|
||||
type: "refine",
|
||||
param: "project",
|
||||
operator: "po",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relprojectid"]: {
|
||||
name: "Project",
|
||||
type: "entity",
|
||||
param: "project",
|
||||
operator: "po",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["relfunder"]: {
|
||||
name: "Funder",
|
||||
type: "refine",
|
||||
param: "funder",
|
||||
operator: "fn",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relfundinglevel0_id"]: {
|
||||
name: "Funding Stream",
|
||||
type: "refine",
|
||||
param: "funderlv0",
|
||||
operator: "fn0",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relfundinglevel1_id"]: {
|
||||
name: "Funding Substream level 1",
|
||||
type: "refine",
|
||||
param: "funderlv1",
|
||||
operator: "fn1",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relfundinglevel2_id"]: {
|
||||
name: "Funding Substream level 2",
|
||||
type: "refine",
|
||||
param: "funderlv2",
|
||||
operator: "fn0",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["resultacceptanceyear"]: {
|
||||
name: "Publication Date",
|
||||
type: "keyword",
|
||||
param: "year",
|
||||
operator: "ya",
|
||||
equalityOperator: " = ",
|
||||
filterType: null
|
||||
},
|
||||
["resultdateofacceptance"]: {
|
||||
name: "Publication Date",
|
||||
type: "date",
|
||||
param: "date",
|
||||
operator: "dt",
|
||||
equalityOperator: " within ",
|
||||
filterType: null
|
||||
},
|
||||
["resultacceptanceyear-range-resultacceptanceyear"]: {
|
||||
name: "Year range",
|
||||
type: "keyword",
|
||||
param: "year",
|
||||
operator: "ya",
|
||||
equalityOperator: " within ",
|
||||
filterType: "range"
|
||||
},
|
||||
["resultbestaccessright"]: {
|
||||
name: "Access Mode",
|
||||
type: "vocabulary",
|
||||
param: "access",
|
||||
operator: "ac",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "radio"
|
||||
},
|
||||
["collectedfrom"]: {
|
||||
name: "Collected From",
|
||||
type: "refine",
|
||||
param: "datasource",
|
||||
operator: "cl",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relorganizationid"]: {
|
||||
name: "Organization",
|
||||
type: "entity",
|
||||
param: "organization",
|
||||
operator: "og",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["collectedfromdatasourceid"]: {
|
||||
name: "Collected from Content Provider",
|
||||
type: "entity",
|
||||
param: "collectedFrom",
|
||||
operator: "cl",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["resulttypeid"]: {
|
||||
name: "Result type",
|
||||
type: "refine",
|
||||
param: "types",
|
||||
operator: "tp",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "radio"
|
||||
}
|
||||
};
|
||||
|
||||
//PROJECT
|
||||
public PROJECT_RANGE_FIELDS = [
|
||||
["projectendyear", "projectstartyear"]
|
||||
];
|
||||
public PROJECT_REFINE_FIELDS:string[] = ["funder","fundinglevel0_id","fundinglevel1_id",
|
||||
"fundinglevel2_id","projectstartyear","projectendyear","projectecsc39"];
|
||||
public PROJECT_ADVANCED_FIELDS:string[] = ["q","projectacronym","projecttitle","projectkeywords",
|
||||
"funder", "fundinglevel0_id","fundinglevel1_id", "fundinglevel2_id",
|
||||
"projectstartdate","projectenddate","projectecsc39",
|
||||
"projectcode_nt","relorganizationid", "collectedfromdatasourceid"];
|
||||
public PROJECT_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["projectacronym"]:{name:"Acronym", type:"keyword", param:"acronym", operator: "ar", equalityOperator: "=", filterType: null},
|
||||
["projecttitle"]:{name:"Title", type:"keyword", param:"title", operator: "tt", equalityOperator: "=", filterType: null},
|
||||
["projectkeywords"]:{name:"Keywords", type:"keyword", param:"keywords", operator: "ky", equalityOperator: "=", filterType: null},
|
||||
public PROJECT_REFINE_FIELDS: string[] = ["funder", "fundinglevel0_id", "fundinglevel1_id",
|
||||
"fundinglevel2_id", "projectstartyear", "projectendyear", "projectecsc39"];
|
||||
public PROJECT_ADVANCED_FIELDS: string[] = ["q", "projectacronym", "projecttitle", "projectkeywords",
|
||||
"funder", "fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
|
||||
"projectstartdate", "projectenddate", "projectecsc39",
|
||||
"projectcode_nt", "relorganizationid", "collectedfromdatasourceid"];
|
||||
public PROJECT_FIELDS: { [key: string]: FieldDetails } = {
|
||||
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["projectacronym"]: {
|
||||
name: "Acronym",
|
||||
type: "keyword",
|
||||
param: "acronym",
|
||||
operator: "ar",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["projecttitle"]: {
|
||||
name: "Title",
|
||||
type: "keyword",
|
||||
param: "title",
|
||||
operator: "tt",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["projectkeywords"]: {
|
||||
name: "Keywords",
|
||||
type: "keyword",
|
||||
param: "keywords",
|
||||
operator: "ky",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
|
||||
["funder"]:{name:"Funder", type:"refine", param:"funder", operator: "fn", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["fundinglevel0_id"]:{name:"Funding Stream", type:"refine", param:"funderlv0", operator: "fn0", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["fundinglevel1_id"]:{name:"Funding Substream level 1", type:"refine", param:"funderlv1", operator: "fn1", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["fundinglevel2_id"]:{name:"Funding Substream level 2", type:"refine", param:"funderlv2", operator: "fn2", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["projectstartyear"]:{name:"Start Year", type:"year", param:"startyear", operator: "sy", equalityOperator: " <= ", filterType: "checkbox"},
|
||||
["projectendyear"]:{name:"End Year", type:"year", param:"endyear", operator: "ey", equalityOperator: " >= ", filterType: "checkbox"},
|
||||
["projectendyear-range-projectstartyear"]:{name:"Active within", type:"year", param:"year", operator: "ya", equalityOperator: " = ", filterType: "range"},
|
||||
["projectstartdate"]:{name:"Start Date", type:"date", param:"startdate", operator: "sd", equalityOperator: " within ", filterType: null},
|
||||
["projectenddate"]:{name:"End Date", type:"date", param:"enddate", operator: "ed", equalityOperator: " within ", filterType: null},
|
||||
["projectecsc39"]:{name:"Special Clause 39", type:"boolean", param:"sc39", operator: "sc", equalityOperator: " exact ", filterType: "radio"},
|
||||
["projectcode_nt"]:{name:"Project Code", type:"keyword", param:"code", operator: "cd", equalityOperator: " exact ", filterType: null},
|
||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", operator: "og", equalityOperator: " exact ", filterType: null},
|
||||
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", operator: "cl", equalityOperator: " exact ", filterType: null}
|
||||
["funder"]: {
|
||||
name: "Funder",
|
||||
type: "refine",
|
||||
param: "funder",
|
||||
operator: "fn",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["fundinglevel0_id"]: {
|
||||
name: "Funding Stream",
|
||||
type: "refine",
|
||||
param: "funderlv0",
|
||||
operator: "fn0",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["fundinglevel1_id"]: {
|
||||
name: "Funding Substream level 1",
|
||||
type: "refine",
|
||||
param: "funderlv1",
|
||||
operator: "fn1",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["fundinglevel2_id"]: {
|
||||
name: "Funding Substream level 2",
|
||||
type: "refine",
|
||||
param: "funderlv2",
|
||||
operator: "fn2",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["projectstartyear"]: {
|
||||
name: "Start Year",
|
||||
type: "year",
|
||||
param: "startyear",
|
||||
operator: "sy",
|
||||
equalityOperator: " <= ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["projectendyear"]: {
|
||||
name: "End Year",
|
||||
type: "year",
|
||||
param: "endyear",
|
||||
operator: "ey",
|
||||
equalityOperator: " >= ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["projectendyear-range-projectstartyear"]: {
|
||||
name: "Active within",
|
||||
type: "year",
|
||||
param: "year",
|
||||
operator: "ya",
|
||||
equalityOperator: " = ",
|
||||
filterType: "range"
|
||||
},
|
||||
["projectstartdate"]: {
|
||||
name: "Start Date",
|
||||
type: "date",
|
||||
param: "startdate",
|
||||
operator: "sd",
|
||||
equalityOperator: " within ",
|
||||
filterType: null
|
||||
},
|
||||
["projectenddate"]: {
|
||||
name: "End Date",
|
||||
type: "date",
|
||||
param: "enddate",
|
||||
operator: "ed",
|
||||
equalityOperator: " within ",
|
||||
filterType: null
|
||||
},
|
||||
["projectecsc39"]: {
|
||||
name: "Special Clause 39",
|
||||
type: "boolean",
|
||||
param: "sc39",
|
||||
operator: "sc",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "radio"
|
||||
},
|
||||
["projectcode_nt"]: {
|
||||
name: "Project Code",
|
||||
type: "keyword",
|
||||
param: "code",
|
||||
operator: "cd",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["relorganizationid"]: {
|
||||
name: "Organization",
|
||||
type: "entity",
|
||||
param: "organization",
|
||||
operator: "og",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["collectedfromdatasourceid"]: {
|
||||
name: "Collected from Content Provider",
|
||||
type: "entity",
|
||||
param: "collectedFrom",
|
||||
operator: "cl",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//DATAPROVIDERS
|
||||
// add Collected From Filter "collectedfromname"
|
||||
public DATASOURCE_REFINE_FIELDS:string[] = ["datasourcetypeuiname", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
public DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypeuiname", "datasourceodlanguages", "datasourceodcontenttypes",
|
||||
"datasourcecompatibilityname", "country", "collectedfromname"];
|
||||
public DATASOURCE_ADVANCED_FIELDS:string[] = ["q", "datasourceofficialname",
|
||||
"datasourceenglishname","datasourceodsubjects", "datasourcetypename","datasourceodlanguages",
|
||||
"datasourceodcontenttypes", "datasourcecompatibilityname","relorganizationid", "collectedfromdatasourceid"];
|
||||
public DATASOURCE_ADVANCED_FIELDS: string[] = ["q", "datasourceofficialname",
|
||||
"datasourceenglishname", "datasourceodsubjects", "datasourcetypename", "datasourceodlanguages",
|
||||
"datasourceodcontenttypes", "datasourcecompatibilityname", "relorganizationid", "collectedfromdatasourceid"];
|
||||
|
||||
public DATASOURCE_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["datasourceofficialname"]:{name:"English name", type:"keyword", param:"officialname", operator: "of", equalityOperator: "=", filterType: null},
|
||||
["datasourceenglishname"]:{name:"Title", type:"keyword", param:"engname", operator: "eg", equalityOperator: "=", filterType: null},
|
||||
["datasourceodsubjects"]:{name:"Subject", type:"keyword", param:"subjects", operator: "sb", equalityOperator: "=", filterType: null},
|
||||
["datasourcetypeuiid"]:{name:"Type", type:"refine", param:"type", operator: "tp", equalityOperator: " exact ", filterType: null},
|
||||
["datasourcetypeuiname"]:{name:"Type", type:"refine", param:"type", operator: "tp", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["datasourcetypename"]:{name:"Type", type:"vocabulary", param:"type", operator: "tp", equalityOperator: " exact ", filterType: null},
|
||||
["datasourceodlanguages"]:{name:"Language", type:"vocabulary", param:"lang", operator: "ln", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["datasourceodcontenttypes"]:{name:"Content", type:"refine", param:"content", operator: "cn", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["datasourcecompatibilityid"]:{name:"Compatibility Level", type:"refine", param:"compatibility", operator: "cm", equalityOperator: " exact ", filterType: null},
|
||||
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", operator: "cm", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", operator: "og", equalityOperator: " exact ", filterType: null},
|
||||
["collectedfromname"]:{name:"Collected from", type:"entity", param:"collectedFrom", operator: "cl", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", operator: "cl", equalityOperator: " exact ", filterType: null},
|
||||
["country"]:{name:"Country", type:"vocabulary", param:"country", operator: "cu", equalityOperator: "=", filterType: "checkbox"}
|
||||
public DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
|
||||
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["datasourceofficialname"]: {
|
||||
name: "English name",
|
||||
type: "keyword",
|
||||
param: "officialname",
|
||||
operator: "of",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["datasourceenglishname"]: {
|
||||
name: "Title",
|
||||
type: "keyword",
|
||||
param: "engname",
|
||||
operator: "eg",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["datasourceodsubjects"]: {
|
||||
name: "Subject",
|
||||
type: "keyword",
|
||||
param: "subjects",
|
||||
operator: "sb",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["datasourcetypeuiid"]: {
|
||||
name: "Type",
|
||||
type: "refine",
|
||||
param: "type",
|
||||
operator: "tp",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["datasourcetypeuiname"]: {
|
||||
name: "Type",
|
||||
type: "refine",
|
||||
param: "type",
|
||||
operator: "tp",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["datasourcetypename"]: {
|
||||
name: "Type",
|
||||
type: "vocabulary",
|
||||
param: "type",
|
||||
operator: "tp",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["datasourceodlanguages"]: {
|
||||
name: "Language",
|
||||
type: "vocabulary",
|
||||
param: "lang",
|
||||
operator: "ln",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["datasourceodcontenttypes"]: {
|
||||
name: "Content",
|
||||
type: "refine",
|
||||
param: "content",
|
||||
operator: "cn",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["datasourcecompatibilityid"]: {
|
||||
name: "Compatibility Level",
|
||||
type: "refine",
|
||||
param: "compatibility",
|
||||
operator: "cm",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["datasourcecompatibilityname"]: {
|
||||
name: "Compatibility Level",
|
||||
type: "vocabulary",
|
||||
param: "compatibility",
|
||||
operator: "cm",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["relorganizationid"]: {
|
||||
name: "Organization",
|
||||
type: "entity",
|
||||
param: "organization",
|
||||
operator: "og",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["collectedfromname"]: {
|
||||
name: "Collected from",
|
||||
type: "entity",
|
||||
param: "collectedFrom",
|
||||
operator: "cl",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["collectedfromdatasourceid"]: {
|
||||
name: "Collected from Content Provider",
|
||||
type: "entity",
|
||||
param: "collectedFrom",
|
||||
operator: "cl",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["country"]: {
|
||||
name: "Country",
|
||||
type: "vocabulary",
|
||||
param: "country",
|
||||
operator: "cu",
|
||||
equalityOperator: "=",
|
||||
filterType: "checkbox"
|
||||
}
|
||||
};
|
||||
|
||||
public DEPOSIT_DATASOURCE_KEYWORD_FIELDS: { "name": string, "equalityOperator": string} []= [
|
||||
public DEPOSIT_DATASOURCE_KEYWORD_FIELDS: { "name": string, "equalityOperator": string } [] = [
|
||||
{"name": "relorganizationname", "equalityOperator": "="},
|
||||
{"name": "relorganizationshortname", "equalityOperator": "="},
|
||||
{"name": "datasourceofficialname", "equalityOperator": "="},
|
||||
|
@ -118,30 +503,86 @@ export class SearchFields {
|
|||
{"name": "country", "equalityOperator": " exact "},
|
||||
{"name": "datasourcesubject", "equalityOperator": " all "}
|
||||
];
|
||||
public DEPOSIT_DATASOURCE_REFINE_FIELDS:string[] = ["datasourcetypeuiname", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname"];
|
||||
public DEPOSIT_DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypeuiname", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname"];
|
||||
|
||||
public DEPOSIT_DATASOURCE_FIELDS: { [key:string]:FieldDetails}={
|
||||
["datasourcetypeuiname"]:{name:"Repository type", type:"refine", param:"type", operator: "tp", equalityOperator: " exact ", filterType: "radio"},
|
||||
["country"]:{name:"Countries", type:"vocabulary", param:"country", operator: "cu", equalityOperator: "=", filterType: "checkbox"},
|
||||
["datasourceodsubjects"]:{name:"Subjects", type:"keyword", param:"subjects", operator: "sb", equalityOperator: "=", filterType: "checkbox"},
|
||||
["datasourceodcontenttypes"]:{name:"Content type", type:"refine", param:"content", operator: "cn", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", operator: "cm", equalityOperator: " exact ", filterType: "checkbox"},
|
||||
public DEPOSIT_DATASOURCE_FIELDS: { [key: string]: FieldDetails } = {
|
||||
["datasourcetypeuiname"]: {
|
||||
name: "Repository type",
|
||||
type: "refine",
|
||||
param: "type",
|
||||
operator: "tp",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "radio"
|
||||
},
|
||||
["country"]: {
|
||||
name: "Countries",
|
||||
type: "vocabulary",
|
||||
param: "country",
|
||||
operator: "cu",
|
||||
equalityOperator: "=",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["datasourceodsubjects"]: {
|
||||
name: "Subjects",
|
||||
type: "keyword",
|
||||
param: "subjects",
|
||||
operator: "sb",
|
||||
equalityOperator: "=",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["datasourceodcontenttypes"]: {
|
||||
name: "Content type",
|
||||
type: "refine",
|
||||
param: "content",
|
||||
operator: "cn",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
["datasourcecompatibilityname"]: {
|
||||
name: "Compatibility Level",
|
||||
type: "vocabulary",
|
||||
param: "compatibility",
|
||||
operator: "cm",
|
||||
equalityOperator: " exact ",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
};
|
||||
|
||||
public COMPATIBLE_DATAPROVIDER_FIELDS:string[] = ["datasourcetypeuiid","datasourcecompatibilityname"];
|
||||
public ENTITY_REGISTRIES_FIELDS:string[] = ["datasourcetypename","datasourcecompatibilityname"];
|
||||
public JOURNAL_FIELDS:string[] = ["datasourcetypeuiid","datasourcecompatibilityname"];
|
||||
public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypeuiid", "datasourcecompatibilityname"];
|
||||
public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"];
|
||||
public JOURNAL_FIELDS: string[] = ["datasourcetypeuiid", "datasourcecompatibilityname"];
|
||||
|
||||
//ORGANIZATION
|
||||
|
||||
public ORGANIZATION_REFINE_FIELDS:string[] = ["country"]
|
||||
public ORGANIZATION_ADVANCED_FIELDS:string[] = ["q", "organizationlegalname","organizationlegalshortname","country"];
|
||||
public ORGANIZATION_REFINE_FIELDS: string[] = ["country"]
|
||||
public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "country"];
|
||||
|
||||
public ORGANIZATION_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", operator:"op", equalityOperator: "=", filterType: null},
|
||||
["organizationlegalname"]:{name:"Legal Name", type:"keyword", param:"name", operator: "nm", equalityOperator: "=", filterType: null},
|
||||
["organizationlegalshortname"]:{name:"Legal Short Name", type:"keyword", param:"shortname", operator: "so", equalityOperator: "=", filterType: null},
|
||||
["country"]:{name:"Country", type:"vocabulary", param:"country", operator: "cu", equalityOperator: "=", filterType: "checkbox"},
|
||||
public ORGANIZATION_FIELDS: { [key: string]: FieldDetails } = {
|
||||
["q"]: {name: "All fields", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
|
||||
["organizationlegalname"]: {
|
||||
name: "Legal Name",
|
||||
type: "keyword",
|
||||
param: "name",
|
||||
operator: "nm",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["organizationlegalshortname"]: {
|
||||
name: "Legal Short Name",
|
||||
type: "keyword",
|
||||
param: "shortname",
|
||||
operator: "so",
|
||||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["country"]: {
|
||||
name: "Country",
|
||||
type: "vocabulary",
|
||||
param: "country",
|
||||
operator: "cu",
|
||||
equalityOperator: "=",
|
||||
filterType: "checkbox"
|
||||
},
|
||||
};
|
||||
// public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
|
||||
// public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
|
||||
|
@ -158,71 +599,84 @@ export class SearchFields {
|
|||
|
||||
|
||||
//add project field depending on funder
|
||||
public HIDDEN_FIELDS:string[] = ["fundinglevel0_id","fundinglevel1_id","fundinglevel2_id",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id", "relproject"];
|
||||
public HIDDEN_FIELDS: string[] = ["fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id",
|
||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject"];
|
||||
|
||||
public DEPENDENT_FIELDS: { [key:string]:string } = {["relproject"]:"relfunder", ["fundinglevel0_id"]:"funder",
|
||||
["fundinglevel1_id"]:"fundinglevel0_id", ["fundinglevel2_id"]:"fundinglevel1_id", ["relfundinglevel0_id"]:"relfunder",
|
||||
["relfundinglevel1_id"]:"relfundinglevel0_id", ["relfundinglevel2_id"]:"relfundinglevel1_id"};
|
||||
public DEPENDENT_FIELDS: { [key: string]: string } = {
|
||||
["relproject"]: "relfunder",
|
||||
["fundinglevel0_id"]: "funder",
|
||||
["fundinglevel1_id"]: "fundinglevel0_id",
|
||||
["fundinglevel2_id"]: "fundinglevel1_id",
|
||||
["relfundinglevel0_id"]: "relfunder",
|
||||
["relfundinglevel1_id"]: "relfundinglevel0_id",
|
||||
["relfundinglevel2_id"]: "relfundinglevel1_id"
|
||||
};
|
||||
|
||||
|
||||
public ADVANCED_SEARCH_OPERATORS:{name:string, id:string}[] = [{name:"AND",id:"and"},{name:"OR",id:"or"},{name:"NOT",id:"not"}];
|
||||
public ADVANCED_SEARCH_OPERATORS: { name: string, id: string }[] = [{name: "AND", id: "and"}, {
|
||||
name: "OR",
|
||||
id: "or"
|
||||
}, {name: "NOT", id: "not"}];
|
||||
|
||||
public COMMUNITIES_SEARCH_FIELDS:string[] = ["type","status","role"];
|
||||
constructor (){
|
||||
public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "status", "role"];
|
||||
|
||||
public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"];
|
||||
|
||||
constructor() {
|
||||
}
|
||||
getFieldName(fieldId:string,fieldType:string):string{
|
||||
if(fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result"){
|
||||
|
||||
getFieldName(fieldId: string, fieldType: string): string {
|
||||
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
||||
return this.RESULT_FIELDS[fieldId].name;
|
||||
}else if(fieldType == "project"){
|
||||
} else if (fieldType == "project") {
|
||||
return this.PROJECT_FIELDS[fieldId].name;
|
||||
}else if(fieldType == "organization"){
|
||||
} else if (fieldType == "organization") {
|
||||
return this.ORGANIZATION_FIELDS[fieldId].name;
|
||||
}else if(fieldType == "datasource" || fieldType == "dataprovider"){
|
||||
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
||||
return this.DATASOURCE_FIELDS[fieldId].name;
|
||||
}else{
|
||||
} else {
|
||||
return "UNDEFINED";
|
||||
}
|
||||
}
|
||||
|
||||
getFieldFilterType(fieldId:string, fieldType:string, usedBy:string="search"):string{
|
||||
if(fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other"|| fieldType == "result"){
|
||||
getFieldFilterType(fieldId: string, fieldType: string, usedBy: string = "search"): string {
|
||||
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
||||
return this.RESULT_FIELDS[fieldId].filterType;
|
||||
}else if(fieldType == "project"){
|
||||
} else if (fieldType == "project") {
|
||||
return this.PROJECT_FIELDS[fieldId].filterType;
|
||||
}else if(fieldType == "organization"){
|
||||
} else if (fieldType == "organization") {
|
||||
return this.ORGANIZATION_FIELDS[fieldId].filterType;
|
||||
}else if(fieldType == "datasource" || fieldType == "dataprovider"){
|
||||
if(usedBy == "search") {
|
||||
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
||||
if (usedBy == "search") {
|
||||
return this.DATASOURCE_FIELDS[fieldId].filterType;
|
||||
} else if(usedBy == "deposit") {
|
||||
} else if (usedBy == "deposit") {
|
||||
return this.DEPOSIT_DATASOURCE_FIELDS[fieldId].filterType;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "checkbox";
|
||||
}
|
||||
}
|
||||
|
||||
getFieldParam(fieldId:string,fieldType:string):string{
|
||||
if(fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result"){
|
||||
getFieldParam(fieldId: string, fieldType: string): string {
|
||||
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
||||
return this.RESULT_FIELDS[fieldId].param;
|
||||
}else if(fieldType == "project"){
|
||||
} else if (fieldType == "project") {
|
||||
return this.PROJECT_FIELDS[fieldId].param;
|
||||
}else if(fieldType == "organization"){
|
||||
} else if (fieldType == "organization") {
|
||||
return this.ORGANIZATION_FIELDS[fieldId].param;
|
||||
}else if(fieldType == "datasource" || fieldType == "dataprovider"){
|
||||
} else if (fieldType == "datasource" || fieldType == "dataprovider") {
|
||||
return this.DATASOURCE_FIELDS[fieldId].param;
|
||||
}else{
|
||||
} else {
|
||||
return "UNDEFINED";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
AND
|
||||
/*
|
||||
AND
|
||||
Funder: relfunder, relfundinglevel0_id, relfundinglevel1_id, relfundinglevel2_id
|
||||
Project: relproject
|
||||
Community: community
|
||||
OR
|
||||
OR
|
||||
Type: instancetypename, datasourcetypeuiname
|
||||
Language: resultlanguagename, datasourceodlanguages
|
||||
Compatibility Level: datasourcecompatibilityname
|
||||
|
@ -230,25 +684,25 @@ OR
|
|||
Content: datasourceodcontenttypes
|
||||
Content Provider: resulthostingdatasource
|
||||
Collected From: collectedfrom
|
||||
BULLETS
|
||||
BULLETS
|
||||
Access Mode: resultbestaccessright
|
||||
Special Clause 39: projectecsc39
|
||||
Versioning:
|
||||
|
||||
RANGE
|
||||
RANGE
|
||||
Publication date: resultacceptanceyear
|
||||
Project life: projectstartyear, projectendyear
|
||||
|
||||
? WHAT ABOUT ?:
|
||||
? WHAT ABOUT ?:
|
||||
Subjects:
|
||||
Supported Identifiers:
|
||||
*/
|
||||
*/
|
||||
|
||||
getFieldOperator(fieldId:string):string{
|
||||
if(fieldId == "relfunder" || fieldId == "relfundinglevel0_id" || fieldId == "relfundinglevel1_id" || fieldId == "relfundinglevel2_id"
|
||||
getFieldOperator(fieldId: string): string {
|
||||
if (fieldId == "relfunder" || fieldId == "relfundinglevel0_id" || fieldId == "relfundinglevel1_id" || fieldId == "relfundinglevel2_id"
|
||||
|| fieldId == "relproject" || fieldId == "community" || fieldId == "projectendyear-range-projectstartyear") {
|
||||
return "and";
|
||||
} else if(fieldId == "instancetypename" || fieldId == "datasourcetypeuiname"
|
||||
} else if (fieldId == "instancetypename" || fieldId == "datasourcetypeuiname"
|
||||
|| fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages"
|
||||
|| fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes"
|
||||
|| fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") {
|
||||
|
@ -257,11 +711,12 @@ RANGE
|
|||
return "or";
|
||||
}
|
||||
}
|
||||
export class FieldDetails{
|
||||
name:string;
|
||||
type:string;
|
||||
param:string;
|
||||
equalityOperator:string;
|
||||
operator:string;
|
||||
|
||||
export class FieldDetails {
|
||||
name: string;
|
||||
type: string;
|
||||
param: string;
|
||||
equalityOperator: string;
|
||||
operator: string;
|
||||
filterType: string = "checkbox";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,22 @@ export class Dates {
|
|||
public static yearMax = (new Date().getFullYear()) + 10;
|
||||
public static currentYear = (new Date().getFullYear());
|
||||
|
||||
public static isValidYear(yearString){
|
||||
public static isValidYear(yearString) {
|
||||
// First check for the pattern
|
||||
if(!/^\d{4}$/.test(yearString))
|
||||
if (!/^\d{4}$/.test(yearString))
|
||||
return false;
|
||||
var year = parseInt(yearString, 10);
|
||||
|
||||
// Check the ranges of month and year
|
||||
if(year < this.yearMin || year > this.yearMax )
|
||||
if (year < this.yearMin || year > this.yearMax)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
//format YYYY-MM-DD
|
||||
public static isValidDate(dateString:string)
|
||||
{
|
||||
public static isValidDate(dateString: string) {
|
||||
// First check for the pattern
|
||||
if(!/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(dateString))
|
||||
if (!/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(dateString))
|
||||
return false;
|
||||
|
||||
// Parse the date parts to integers
|
||||
|
@ -28,92 +28,99 @@ export class Dates {
|
|||
var day = parseInt(parts[2], 10);
|
||||
var month = parseInt(parts[1], 10);
|
||||
var year = parseInt(parts[0], 10);
|
||||
if(!this.isValidYear(parts[0])){
|
||||
if (!this.isValidYear(parts[0])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check the ranges of month and year
|
||||
if( month == 0 || month > 12)
|
||||
if (month == 0 || month > 12)
|
||||
return false;
|
||||
|
||||
var monthLength = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
|
||||
var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
|
||||
// Adjust for leap years
|
||||
if(year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
|
||||
if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
|
||||
monthLength[1] = 29;
|
||||
|
||||
// Check the range of the day
|
||||
return day > 0 && day <= monthLength[month - 1];
|
||||
|
||||
}
|
||||
public static getDateToday():Date{
|
||||
|
||||
public static getDateToday(): Date {
|
||||
var myDate = new Date();
|
||||
return myDate;
|
||||
|
||||
}
|
||||
public static getDateToString(myDate:Date):string{
|
||||
var date:string = myDate.getFullYear()+ "-" ;
|
||||
date+=((myDate.getMonth() + 1)<10)?"0"+(myDate.getMonth() + 1):(myDate.getMonth() + 1) ;
|
||||
date+="-";
|
||||
date+= (myDate.getDate() <10 )? "0"+myDate.getDate():myDate.getDate() ;
|
||||
|
||||
public static getDateToString(myDate: Date): string {
|
||||
var date: string = myDate.getFullYear() + "-";
|
||||
date += ((myDate.getMonth() + 1) < 10) ? "0" + (myDate.getMonth() + 1) : (myDate.getMonth() + 1);
|
||||
date += "-";
|
||||
date += (myDate.getDate() < 10) ? "0" + myDate.getDate() : myDate.getDate();
|
||||
return date;
|
||||
|
||||
}
|
||||
public static getDateXMonthsAgo(x:number):Date{
|
||||
|
||||
public static getDateXMonthsAgo(x: number): Date {
|
||||
var myDate = new Date();
|
||||
myDate.setMonth(myDate.getMonth() - x);
|
||||
return myDate;
|
||||
|
||||
}
|
||||
public static getDateXYearsAgo(x:number):Date{
|
||||
|
||||
public static getDateXYearsAgo(x: number): Date {
|
||||
var myDate = new Date();
|
||||
myDate.setFullYear(myDate.getFullYear() - x);
|
||||
return myDate;
|
||||
|
||||
}
|
||||
public static getDateFromString(date:string):Date{
|
||||
|
||||
public static getDateFromString(date: string): Date {
|
||||
|
||||
var myDate = new Date();
|
||||
myDate.setFullYear(+date.substring(0,4));
|
||||
myDate.setMonth(((date.length>5 )?(+date.substring(5,7)-1):(0)));
|
||||
myDate.setDate(((date.length>8 )?(+date.substring(8,11)):(1)));
|
||||
myDate.setFullYear(+date.substring(0, 4));
|
||||
myDate.setMonth(((date.length > 5) ? (+date.substring(5, 7) - 1) : (0)));
|
||||
myDate.setDate(((date.length > 8) ? (+date.substring(8, 11)) : (1)));
|
||||
return myDate;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class DOI{
|
||||
export class DOI {
|
||||
|
||||
public static getDOIsFromString(str:string):string[]{
|
||||
public static getDOIsFromString(str: string): string[] {
|
||||
return Identifier.getDOIsFromString(str);
|
||||
}
|
||||
public static isValidDOI(str:string):boolean{
|
||||
|
||||
public static isValidDOI(str: string): boolean {
|
||||
return Identifier.isValidDOI(str);
|
||||
}
|
||||
}
|
||||
|
||||
export class Identifier{
|
||||
class: "doi" | "pmc" | "pmid" | "handle"|"ORCID" =null;
|
||||
id:string;
|
||||
export class Identifier {
|
||||
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" = null;
|
||||
id: string;
|
||||
|
||||
public static getDOIsFromString(str:string):string[]{
|
||||
var DOIs:string[] = [];
|
||||
var words:string[] = str.split(" ");
|
||||
public static getDOIsFromString(str: string): string[] {
|
||||
var DOIs: string[] = [];
|
||||
var words: string[] = str.split(" ");
|
||||
|
||||
for(var i=0; i< words.length; i++){
|
||||
if(DOI.isValidDOI(words[i]) && DOIs.indexOf(words[i]) == -1){
|
||||
for (var i = 0; i < words.length; i++) {
|
||||
if (DOI.isValidDOI(words[i]) && DOIs.indexOf(words[i]) == -1) {
|
||||
DOIs.push(words[i]);
|
||||
}
|
||||
}
|
||||
return DOIs;
|
||||
}
|
||||
public static getIdentifiersFromString(str:string):Identifier[]{
|
||||
let identifiers:Identifier[] = [];
|
||||
let words:string[] = str.split(" ");
|
||||
|
||||
for(let id of words){
|
||||
if(id.length > 0 ) {
|
||||
public static getIdentifiersFromString(str: string): Identifier[] {
|
||||
let identifiers: Identifier[] = [];
|
||||
let words: string[] = str.split(" ");
|
||||
|
||||
for (let id of words) {
|
||||
if (id.length > 0) {
|
||||
if (Identifier.isValidDOI(id)) {
|
||||
identifiers.push({"class": "doi", "id": id})
|
||||
} else if (Identifier.isValidORCID(id)) {
|
||||
|
@ -129,66 +136,73 @@ export class Identifier{
|
|||
}
|
||||
return identifiers;
|
||||
}
|
||||
public static isValidDOI(str:string):boolean{
|
||||
|
||||
public static isValidDOI(str: string): boolean {
|
||||
var exp1 = /\b(10[.][0-9]{4,}(?:[.][0-9]+)*\/(?:(?!["&\'<>])\S)+)\b/g
|
||||
var exp2 = /\b(10[.][0-9]{4,}(?:[.][0-9]+)*\/(?:(?!["&\'<>])[[:graph:]])+)\b/g
|
||||
return (str.match(exp1)!=null || str.match(exp2)!=null);
|
||||
}
|
||||
public static isValidORCID(str:string):boolean{
|
||||
let exp =/\b\d{4}-\d{4}-\d{4}-(\d{3}X|\d{4})\b/g;
|
||||
return str.match(exp)!=null;
|
||||
}
|
||||
public static isValidPMID(str:string):boolean{
|
||||
let exp =/^\d*$/g;
|
||||
return str.match(exp)!=null;
|
||||
|
||||
}
|
||||
public static isValidPMCID(str:string):boolean{
|
||||
let exp =/^(PMC\d{7})$/g;
|
||||
return str.match(exp)!=null;
|
||||
return (str.match(exp1) != null || str.match(exp2) != null);
|
||||
}
|
||||
|
||||
public static isValidHANDLE(str:string):boolean{
|
||||
let exp =/^[0-9a-zA-Z-]*\/[0-9a-zA-Z-]*$/g;
|
||||
return str.match(exp)!=null;
|
||||
public static isValidORCID(str: string): boolean {
|
||||
let exp = /\b\d{4}-\d{4}-\d{4}-(\d{3}X|\d{4})\b/g;
|
||||
return str.match(exp) != null;
|
||||
}
|
||||
|
||||
public static isValidPMID(str: string): boolean {
|
||||
let exp = /^\d*$/g;
|
||||
return str.match(exp) != null;
|
||||
|
||||
}
|
||||
|
||||
public static isValidPMCID(str: string): boolean {
|
||||
let exp = /^(PMC\d{7})$/g;
|
||||
return str.match(exp) != null;
|
||||
}
|
||||
|
||||
public static isValidHANDLE(str: string): boolean {
|
||||
let exp = /^[0-9a-zA-Z-]*\/[0-9a-zA-Z-]*$/g;
|
||||
return str.match(exp) != null;
|
||||
}
|
||||
}
|
||||
export class StringUtils{
|
||||
|
||||
export class StringUtils {
|
||||
public static urlPrefix(url: string): string {
|
||||
if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
|
||||
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
|
||||
return "";
|
||||
} else {
|
||||
return "//";
|
||||
}
|
||||
}
|
||||
|
||||
public static quote(params: string):string {
|
||||
return '"'+params+'"';
|
||||
public static quote(params: string): string {
|
||||
return '"' + params + '"';
|
||||
}
|
||||
|
||||
public static unquote(params: string):string {
|
||||
if(params.length > 2 && (params[0]=='"' && params[params.length-1]=='"') || (params[0]=="'" && params[params.length-1]=="'")){
|
||||
params= params.substring(1, params.length-1);
|
||||
public static unquote(params: string): string {
|
||||
if (params.length > 2 && (params[0] == '"' && params[params.length - 1] == '"') || (params[0] == "'" && params[params.length - 1] == "'")) {
|
||||
params = params.substring(1, params.length - 1);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
public static URIEncode(params: string):string {
|
||||
|
||||
public static URIEncode(params: string): string {
|
||||
return encodeURIComponent(params);
|
||||
}
|
||||
public static URIDecode(params: string):string {
|
||||
|
||||
public static URIDecode(params: string): string {
|
||||
return decodeURIComponent(params);
|
||||
}
|
||||
|
||||
public static b64DecodeUnicode(str) {
|
||||
return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) {
|
||||
return decodeURIComponent(Array.prototype.map.call(atob(str), function (c) {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
}).join(''));
|
||||
}
|
||||
private emailValidator(email : any): boolean {
|
||||
if (email.match("^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
private emailValidator(email: any): boolean {
|
||||
return !!email.match("^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$");
|
||||
}
|
||||
|
||||
public static sliceString(mystr, size: number): string {
|
||||
const sliced = String(mystr).substr(0, size);
|
||||
return sliced + (String(mystr).length > size ? '...' : '');
|
||||
|
@ -205,13 +219,13 @@ export class StringUtils{
|
|||
let words: (string | string[])[] = [text];
|
||||
separators.forEach(separator => {
|
||||
words.forEach((word, index) => {
|
||||
if(typeof word === "string" && separators.indexOf(word) === -1) {
|
||||
if (typeof word === "string" && separators.indexOf(word) === -1) {
|
||||
let tokens: string[] = word.split(separator).filter(value => value !== '');
|
||||
if(tokens.length > 1) {
|
||||
if (tokens.length > 1) {
|
||||
words[index] = [];
|
||||
tokens.forEach((token, i) => {
|
||||
(<string[]>(words[index])).push(token);
|
||||
if(i !== (tokens.length - 1)) {
|
||||
if (i !== (tokens.length - 1)) {
|
||||
(<string[]>(words[index])).push(separator);
|
||||
}
|
||||
});
|
||||
|
@ -227,6 +241,13 @@ export class StringUtils{
|
|||
return value.charAt(0).toUpperCase() + value.slice(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a text contains a word
|
||||
*/
|
||||
public static containsWord(text: string, word: string):boolean {
|
||||
return (text && text.toLowerCase().includes(word));
|
||||
}
|
||||
|
||||
public static URLSegmentsToPath(segments: UrlSegment[]): string {
|
||||
let path = '';
|
||||
segments.forEach(route => {
|
||||
|
@ -234,13 +255,14 @@ export class StringUtils{
|
|||
})
|
||||
return path;
|
||||
}
|
||||
public static isEuropeanCountry(country:string){
|
||||
let countries =["Albania", "Andorra", "Armenia", "Austria", "Azerbaijan", "Belarus", "Belgium", "Bosnia and Herzegovina",
|
||||
|
||||
public static isEuropeanCountry(country: string) {
|
||||
let countries = ["Albania", "Andorra", "Armenia", "Austria", "Azerbaijan", "Belarus", "Belgium", "Bosnia and Herzegovina",
|
||||
"Bulgaria", "Croatia", "Cyprus", "Czech Republic", "Denmark", "Estonia", "Finland", "France", "Georgia", "Germany", "Greece", "Hungary", "Iceland", "Ireland",
|
||||
"Italy", "Kosovo", "Latvia", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Malta", "Moldova", "Monaco", "Montenegro", "The Netherlands", "Norway","Poland",
|
||||
"Portugal", "Romania", "Russia", "San Marino", "Serbia", "Slovakia","Slovenia", "Spain", "Sweden", "Switzerland", "Turkey", "Ukraine", "United Kingdom", "Vatican City",
|
||||
"Italy", "Kosovo", "Latvia", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Malta", "Moldova", "Monaco", "Montenegro", "The Netherlands", "Norway", "Poland",
|
||||
"Portugal", "Romania", "Russia", "San Marino", "Serbia", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland", "Turkey", "Ukraine", "United Kingdom", "Vatican City",
|
||||
];
|
||||
return (country && countries.indexOf(country)!= -1);
|
||||
return (country && countries.indexOf(country) != -1);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue