claims updates
This commit is contained in:
parent
7a8358bb47
commit
b027575fc0
|
@ -4,32 +4,27 @@
|
|||
<div class="uk-width-expand">
|
||||
|
||||
<div class="uk-grid uk-flex uk-flex-middle">
|
||||
<div class="uk-width-1-2">
|
||||
Select communities to link to
|
||||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<div class="uk-margin">
|
||||
<div class="uk-inline">
|
||||
<span class="uk-form-icon uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
|
||||
<input class=" uk-input uk-width-medium" [(ngModel)]="keyword" name="keyword"
|
||||
placeholder="Search communities..."/>
|
||||
<span *ngIf="keyword.length > 0" class="uk-margin-small-right uk-icon" style="cursor: pointer;"
|
||||
(click)="keyword='';">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" data-svg="close"><path fill="none" stroke="#000"
|
||||
stroke-width="1.06"
|
||||
d="M16,16 L4,4"></path><path
|
||||
fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.06"
|
||||
d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-margin">
|
||||
<div class="uk-inline">
|
||||
<claim-enities-selection *ngIf="showOptions && showOptions.linkToEntities.length > 0"
|
||||
[showOptions]="showOptions"></claim-enities-selection>
|
||||
<span class="uk-form-icon uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
|
||||
<input class=" uk-input uk-width-medium" [(ngModel)]="keyword" name="keyword"
|
||||
placeholder="Search communities..."/>
|
||||
<span *ngIf="keyword.length > 0" class="uk-margin-small-right uk-icon" style="cursor: pointer;"
|
||||
(click)="keyword='';">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" data-svg="close"><path fill="none" stroke="#000"
|
||||
stroke-width="1.06"
|
||||
d="M16,16 L4,4"></path><path
|
||||
fill="none"
|
||||
stroke="#000"
|
||||
stroke-width="1.06"
|
||||
d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-margin-right uk-padding">
|
||||
<span *ngFor="let community of communities" [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''">
|
||||
|
|
|
@ -21,6 +21,7 @@ export class ClaimContextSearchFormComponent {
|
|||
@Input() communityId: string = null;
|
||||
@Input() public inlineClaim: boolean = false;
|
||||
@Input() basketLimit;
|
||||
@Input() showOptions;
|
||||
|
||||
public selectedCommunityId: string = "0";
|
||||
public selectedCategoryId: string = "0";
|
||||
|
|
|
@ -5,12 +5,13 @@ import { ClaimContextSearchFormComponent } from './claimContextSearchForm.compon
|
|||
import {StaticAutocompleteModule} from '../../utils/staticAutoComplete/staticAutoComplete.module';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
import {ClaimProjectsSearchFormModule} from "./claimProjectSearchForm.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,RouterModule,
|
||||
SharedModule, RouterModule,
|
||||
StaticAutocompleteModule,
|
||||
HelperModule
|
||||
HelperModule, ClaimProjectsSearchFormModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
import {Component, Input, ViewChild} from '@angular/core';
|
||||
import {ShowOptions} from './claimHelper.class';
|
||||
import {MatSelect} from "@angular/material/select";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'claim-enities-selection',
|
||||
|
||||
template:`
|
||||
<span *ngIf="showOptions && showOptions.linkToEntities && showOptions.linkToEntities.length > 0"
|
||||
class=" entitiesSelection portal-box uk-text-small clickable" style=""
|
||||
(click)="open()">
|
||||
<mat-select [(value)]="showOptions.show"
|
||||
[disableOptionCentering]="true" >
|
||||
|
||||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1" value="result">Research outcomes</mat-option>
|
||||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1" value="project">Projects</mat-option>
|
||||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1" value="context">Research communities</mat-option>
|
||||
|
||||
</mat-select>
|
||||
|
||||
|
||||
</span>
|
||||
`,
|
||||
|
||||
})
|
||||
export class ClaimEntitiesSelectionComponent{
|
||||
@ViewChild(MatSelect) matSelect: MatSelect;
|
||||
@Input() showOptions:ShowOptions = new ShowOptions();
|
||||
|
||||
open() {
|
||||
if (this.matSelect && !this.matSelect.focused) {
|
||||
this.matSelect.open();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -142,8 +142,8 @@ export class ShowOptions {
|
|||
show: string; //show values: source, result, project, context, claim
|
||||
linkTo: string; // linkTo /values: result, project, context
|
||||
linkToEntities: string[]; // show linkToEntities /values: result, project, context
|
||||
basketShowSources: boolean;
|
||||
basketShowLinksTo: boolean;
|
||||
basketShowSources: boolean = true;
|
||||
basketShowLinksTo: boolean = false;
|
||||
|
||||
constructor() {
|
||||
this.show = "source";
|
||||
|
@ -155,23 +155,24 @@ export class ShowOptions {
|
|||
|
||||
showSource() {
|
||||
this.show = "source";
|
||||
this.basketswitchToSources();
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
basketswitchToSources() {
|
||||
this.basketShowLinksTo = false;
|
||||
this.basketShowSources = true;
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
|
||||
showLinkTo() {
|
||||
this.show = this.linkTo;
|
||||
basketswitchToLinkTo() {
|
||||
this.basketShowLinksTo = true;
|
||||
this.basketShowSources = false;
|
||||
}
|
||||
showLinkTo() {
|
||||
console.log(this.linkTo, "showLinkTo")
|
||||
this.show = this.linkTo;
|
||||
this.basketswitchToLinkTo();
|
||||
HelperFunctions.scroll();
|
||||
|
||||
}
|
||||
|
||||
showBasketSources() {
|
||||
if (this.show != 'source') {
|
||||
this.basketShowSources = !this.basketShowSources;
|
||||
this.basketShowLinksTo = !this.basketShowSources;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<form class=" uk-margin-top uk-animation ">
|
||||
<div class="uk-margin-small-bottom">Start searching for projects and add them to the basket to link them to your sources
|
||||
<!-- <helper div="link-project-form" tooltip=true></helper> -->
|
||||
</div>
|
||||
|
||||
<!-- <input class=" uk-input uk-width-large" [(ngModel)]="keyword" name="keyword" placeholder="Search for projects..."/>-->
|
||||
<div class="uk-inline">
|
||||
|
||||
<div class="uk-inline">
|
||||
<claim-enities-selection *ngIf="showOptions && showOptions.linkToEntities.length > 0" [showOptions]="showOptions"></claim-enities-selection>
|
||||
<a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
|
||||
(click)="keyword = ''"
|
||||
uk-icon="icon: close"></a>
|
||||
|
@ -93,10 +91,12 @@
|
|||
<button class="uk-button uk-button-default uk-button-small uk-margin-small-right"
|
||||
type="button">{{filter.title}}<span uk-icon="chevron-down"></span></button>
|
||||
<div uk-dropdown="mode: click" class="uk-width-large" style="max-width:460px !important;">
|
||||
<range-filter [isDisabled]="openaireResultsStatus ==
|
||||
<div class="uk-padding-small uk-overflow-auto uk-height-max-large uk-height-min-medium">
|
||||
<range-filter [isDisabled]="openaireResultsStatus ==
|
||||
errorCodes.LOADING" [filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
|
||||
[showQuickButtons]="false"
|
||||
></range-filter>
|
||||
></range-filter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -107,11 +107,13 @@
|
|||
<div class="uk-inline">
|
||||
<button class="uk-button uk-button-default uk-button-small uk-margin-small-right"
|
||||
type="button">{{filter.title}}<span uk-icon="chevron-down"></span></button>
|
||||
<div uk-dropdown="mode: click" class="uk-width-large uk-height-large uk-overflow-auto" style="max-width:460px !important; ">
|
||||
<search-filter [isDisabled]="openaireResultsStatus ==
|
||||
<div uk-dropdown="mode: click" class="uk-width-large uk-overflow-auto" style="max-width:460px !important; ">
|
||||
<div class="uk-padding-small uk-overflow-auto uk-height-max-large uk-height-min-medium">
|
||||
<search-filter [isDisabled]="openaireResultsStatus ==
|
||||
errorCodes.LOADING" [filter]="filter"
|
||||
[showResultCount]=true
|
||||
[showResultCount]=true filterValuesNum="0"
|
||||
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
|
|
@ -39,6 +39,7 @@ export class ClaimProjectsSearchFormComponent {
|
|||
@Input() public inlineClaim:boolean=false;
|
||||
@Input() localStoragePrefix:string = "";
|
||||
@Input() basketLimit;
|
||||
@Input() showOptions;
|
||||
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public projects:string[];
|
||||
|
|
|
@ -16,20 +16,23 @@ import {ClaimResultsModule} from './claimResults.module';
|
|||
import {PagingModule } from '../../utils/paging.module';
|
||||
import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.module';
|
||||
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
|
||||
import {ClaimEntitiesSelectionComponent} from "./claimEntitiesSelection.component";
|
||||
import {MatSelectModule} from "@angular/material/select";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule, CommonModule,
|
||||
// LoadingModalModule,
|
||||
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
|
||||
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule
|
||||
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, MatSelectModule
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
declarations: [
|
||||
ClaimProjectsSearchFormComponent
|
||||
declarations: [
|
||||
ClaimProjectsSearchFormComponent,
|
||||
ClaimEntitiesSelectionComponent
|
||||
|
||||
],
|
||||
exports: [ClaimProjectsSearchFormComponent ]
|
||||
})
|
||||
],
|
||||
exports: [ClaimProjectsSearchFormComponent, ClaimEntitiesSelectionComponent]
|
||||
})
|
||||
export class ClaimProjectsSearchFormModule { }
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
|
||||
<div class="uk-inline">
|
||||
<claim-enities-selection *ngIf="showOptions && showOptions.linkToEntities.length > 0"
|
||||
[showOptions]="showOptions"></claim-enities-selection>
|
||||
<a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
|
||||
(click)="keyword = ''"
|
||||
uk-icon="icon: close"></a>
|
||||
|
@ -148,10 +150,12 @@
|
|||
<button class="uk-button uk-button-default uk-button-small uk-margin-small-right"
|
||||
type="button">{{filter.title}}<span uk-icon="chevron-down"></span></button>
|
||||
<div uk-dropdown="mode: click" class="uk-width-large" style="max-width:460px !important;" >
|
||||
<range-filter [isDisabled]="openaireResultsStatus ==
|
||||
errorCodes.LOADING" [filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
|
||||
[showQuickButtons]="false"
|
||||
></range-filter>
|
||||
<div class="uk-padding-small uk-overflow-auto uk-height-max-large uk-height-min-medium">
|
||||
<range-filter [isDisabled]="openaireResultsStatus ==
|
||||
errorCodes.LOADING" [filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
|
||||
[showQuickButtons]="false"
|
||||
></range-filter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -163,10 +167,12 @@
|
|||
<button class="uk-button uk-button-default uk-button-small uk-margin-small-right"
|
||||
type="button">{{filter.title}}<span uk-icon="chevron-down"></span></button>
|
||||
<div uk-dropdown="mode: click" class=" uk-width-large uk-height-max-large " style="max-width:460px !important;">
|
||||
<search-filter [isDisabled]="openaireResultsStatus ==
|
||||
errorCodes.LOADING" [filter]="filter"
|
||||
[showResultCount]=true
|
||||
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
|
||||
<div class="uk-padding-small uk-overflow-auto uk-height-max-large uk-height-min-medium">
|
||||
<search-filter [isDisabled]="openaireResultsStatus ==
|
||||
errorCodes.LOADING" [filter]="filter" [filterValuesNum]="0"
|
||||
[showResultCount]=true
|
||||
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
|
|
@ -29,6 +29,7 @@ export class ClaimResultSearchFormComponent {
|
|||
@Input() public properties: EnvProperties;
|
||||
@Input() localStoragePrefix: string = "";
|
||||
@Input() basketLimit;
|
||||
@Input() showOptions;
|
||||
|
||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
|
||||
|
|
|
@ -17,10 +17,11 @@ import {HelperModule} from '../../utils/helper/helper.module';
|
|||
import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.module';
|
||||
import {QuickSelectionsModule} from "../../searchPages/searchUtils/quick-selections.module";
|
||||
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
|
||||
import {ClaimProjectsSearchFormModule} from "./claimProjectSearchForm.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule, CommonModule, SearchResearchResultsServiceModule, PagingModule, SearchCrossrefServiceModule,
|
||||
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule],
|
||||
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule],
|
||||
providers:[
|
||||
SearchOrcidService
|
||||
],
|
||||
|
|
|
@ -7,10 +7,10 @@ declare var UIkit: any;
|
|||
selector: 'claim-results',
|
||||
template: `
|
||||
|
||||
<ul *ngIf="results.length > 0 " class="uk-list uk-list-divider">
|
||||
<li *ngFor=" let entity of results " [class]="(isSelected(entity))?'uk-block-muted':''">
|
||||
<div *ngIf="results.length > 0 " class="uk-padding">
|
||||
<div *ngFor=" let entity of results " [class]="(isSelected(entity))?'uk-block-muted':''" class=" uk-card uk-card-default uk-padding-small uk-margin-bottom">
|
||||
<div>
|
||||
<div class="uk-text-muted">
|
||||
<div class="uk-text-muted uk-text-small">
|
||||
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
|
||||
</div>
|
||||
<div class="uk-grid">
|
||||
|
@ -19,7 +19,7 @@ declare var UIkit: any;
|
|||
<claim-result-metadata [entity]="entity"></claim-result-metadata>
|
||||
<claim-project-metadata [entity]="entity"></claim-project-metadata>
|
||||
</div>
|
||||
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left" [title]="(this.selectedResults.length>=basketLimit)?'Basket reached the size limit':''">
|
||||
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left uk-margin-small-right" [title]="(this.selectedResults.length>=basketLimit)?'Basket reached the size limit':''">
|
||||
<a [class]="(this.selectedResults.length>=basketLimit)?'uk-icon-button uk-disabled':'uk-icon-button '" *ngIf="!isSelected(entity)"
|
||||
(click)="add(entity)">
|
||||
<span class="uk-icon">
|
||||
|
@ -37,8 +37,8 @@ declare var UIkit: any;
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>`,
|
||||
</div>
|
||||
</div>`,
|
||||
|
||||
})
|
||||
export class ClaimResultsComponent {
|
||||
|
|
|
@ -38,7 +38,7 @@ import {Subscriber} from "rxjs";
|
|||
|
||||
<div>
|
||||
<a *ngIf="!claiming " (click)="insert()"
|
||||
[class]="getButtonClass()">CONFIRM LINKING
|
||||
class="uk-text-center ">CONFIRM LINKING
|
||||
<span [class]="(defaultColors?'':' uk-margin-small-top ')+'uk-icon uk-text-bold uk-margin-small-right'" uk-icon="arrow-right">
|
||||
|
||||
</span>
|
||||
|
|
|
@ -1,38 +1,20 @@
|
|||
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
<div class="" >
|
||||
<div class=" uk-flex uk-flex-center uk-text-small" >
|
||||
<div class=" uk-grid uk-flex uk-flex-center uk-flex-middle uk-width-auto">
|
||||
<div class=" uk-width-auto">
|
||||
|
||||
<a class="uk-icon-button uk-border-circle" [class.uk-button-primary]="showOptions.show !='source'"
|
||||
[class.uk-button-secondary]="showOptions.show =='source'" (click)="showOptions.show = 'source';
|
||||
scrollUp();">
|
||||
<span *ngIf="showOptions.show == 'source' || sources.length == 0 ">1</span>
|
||||
<span *ngIf="showOptions.show != 'source' && sources.length > 0 " uk-icon="check"></span>
|
||||
</a>
|
||||
<span class="uk-margin-small-left">Find Sources</span>
|
||||
|
||||
</div>
|
||||
<div class="mat-stepper-horizontal-line uk-margin-small-left"></div>
|
||||
<div class=" uk-width-auto">
|
||||
<a class=" uk-icon-button " [class.uk-button-primary]="showOptions.show =='claim'"
|
||||
[class.uk-button-secondary]="showOptions.show !='claim'" [class.uk-disabled]="sources.length == 0"
|
||||
(click)="openSelectionModal();">
|
||||
<span *ngIf="(showOptions.show != 'source' && showOptions.show != 'claim') || results.length == 0 ">2</span>
|
||||
<span *ngIf="!(showOptions.show != 'source' && showOptions.show != 'claim') && results.length > 0 " uk-icon="check"></span>
|
||||
|
||||
</a>
|
||||
<span class="uk-margin-small-left">Link Sources to Entities</span>
|
||||
</div>
|
||||
<div class="mat-stepper-horizontal-line uk-margin-small-left"></div>
|
||||
<div class=" uk-width-auto">
|
||||
<a class="uk-icon-button uk-border-circle" [class.uk-disabled]="sources.length == 0 || results.length == 0 "
|
||||
[class.uk-button-secondary]="showOptions.show =='claim'" (click)="showOptions.show = 'claim'; scrollUp();">3</a>
|
||||
<span class="uk-margin-small-left">Summarize and finish</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<stepper>
|
||||
<step [status]="stepStatus('source')" stepId="source" stepNumber="1"
|
||||
[stepText]="'Find Sources'" (stepChanged)="stepHasChanged($event)"
|
||||
[active]="this.showOptions.show" [showStepLine]="false"></step>
|
||||
<!-- <step-line [status]="stepStatus('source')"></step-line>-->
|
||||
<step [status]="stepStatus('target')" stepId="target" [stepNumber]="inlineEntity?1:2"
|
||||
[stepText]="'Link Source' + (inlineEntity?'':'s') + ' to Entities'"
|
||||
(stepChanged)="stepHasChanged($event)" [active]="this.showOptions.show"
|
||||
[showStepLine]="true"></step>
|
||||
<!-- <step-line [status]="stepStatus('target')"></step-line>-->
|
||||
<step [status]="stepStatus('claim')" stepId="claim" [stepNumber]="inlineEntity?2:3"
|
||||
[stepText]="'Summarize and finish'"
|
||||
(stepChanged)="stepHasChanged($event)" [active]="this.showOptions.show"
|
||||
[showStepLine]="true"></step>
|
||||
|
||||
</stepper>
|
||||
|
||||
<metadata-preview *ngIf="showOptions.show=='claim' && properties" class="uk-margin-top"
|
||||
[results]="results" [sources]="sources"
|
||||
|
@ -47,11 +29,8 @@
|
|||
<schema2jsonld *ngIf="url" [URL]="url" name="Link your research outcomes" type="other"></schema2jsonld>
|
||||
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
||||
<div>
|
||||
<!-- <div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div> -->
|
||||
|
||||
<div class="uk-grid helper-grid">
|
||||
<!-- <helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>-->
|
||||
<div class="uk-width-expand">
|
||||
|
||||
<div *ngIf="properties" class="uk-section uk-section-default white-box-with-border uk-padding-small uk-padding-remove-top">
|
||||
|
@ -60,41 +39,8 @@
|
|||
[class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
||||
<div id="basketStickTop"></div>
|
||||
<div class="uk-grid" *ngIf="showOptions.show!='claim'" >
|
||||
<div class="uk-width-2-3">
|
||||
<div class="uk-margin-small-bottom">
|
||||
<div class="uk-width-2-3 uk-padding">
|
||||
|
||||
<!--<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length > 1"
|
||||
class="uk-flex-inline uk-flex-middle uk-width-3-5@m uk-width-1-1@s">
|
||||
<span class="uk-width-1-4 uk-text-muted uk-text-large">LINK TO </span>
|
||||
<mat-select [(ngModel)]="showOptions.show" class="uk-width-3-4@m matSelection"
|
||||
*ngIf="showOptions.linkToEntities.length > 1"
|
||||
[disableOptionCentering]="true"
|
||||
panelClass="matSelectionPanel">
|
||||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
|
||||
value="project">PROJECTS</mat-option>
|
||||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH
|
||||
RESULTS</mat-option>
|
||||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</span>-->
|
||||
|
||||
<!--<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length ==1">
|
||||
<span>LINK TO </span>
|
||||
<span class=" uk-width-auto uk-text-bold">
|
||||
<span *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
|
||||
value="project">PROJECTS</span>
|
||||
<span *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH
|
||||
RESULTS</span>
|
||||
<span *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
|
||||
</span>
|
||||
</span>
|
||||
</span>-->
|
||||
<!--<span *ngIf="showOptions.show=='source'" class="uk-text-bold">
|
||||
ADD LINKING SOURCES
|
||||
</span>-->
|
||||
|
||||
</div>
|
||||
<div *ngIf="showOptions.show=='source'">
|
||||
<claim-result-search-form [selectedResults]="sources" [properties]=properties
|
||||
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
|
||||
|
@ -102,72 +48,55 @@
|
|||
</div>
|
||||
<div *ngIf="showOptions.show=='project'">
|
||||
<claim-projects-search-form [selectedProjects]="results" [properties]=properties
|
||||
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
|
||||
[localStoragePrefix]="localStoragePrefix+'results'"
|
||||
[basketLimit]="basketLimit" [showOptions]="showOptions"
|
||||
></claim-projects-search-form>
|
||||
</div>
|
||||
<div *ngIf="showOptions.show=='context'">
|
||||
<claim-contexts-search-form [communityId]=communityId [results]="results" [sources]="sources"
|
||||
[properties]=properties
|
||||
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
|
||||
[localStoragePrefix]="localStoragePrefix+'results'"
|
||||
[basketLimit]="basketLimit" [showOptions]="showOptions"
|
||||
></claim-contexts-search-form>
|
||||
</div>
|
||||
<div *ngIf="showOptions.show=='result'">
|
||||
<claim-result-search-form [selectedResults]="results" [properties]=properties
|
||||
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
|
||||
[localStoragePrefix]="localStoragePrefix+'results'"
|
||||
[basketLimit]="basketLimit" [showOptions]="showOptions"
|
||||
></claim-result-search-form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Basket-->
|
||||
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3" style="" >
|
||||
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3 uk-padding-remove-left"
|
||||
style="" >
|
||||
<div id="basket" uk-sticky=" offset: 130; top:#basketStickTop; bottom: #basketStickBottom;"
|
||||
style="z-index: 0">
|
||||
|
||||
style="z-index: 0" class="uk-card uk-card-default">
|
||||
<div class="linksbasket uk-inline uk-width-1-1" style="">
|
||||
<div *ngIf="inlineEntity == null">
|
||||
<ul class="" uk-tab>
|
||||
<li class="uk-active"><a href="#">Sources to link ({{(sources.length) | number}})</a></li>
|
||||
<li [class.uk-disabled]="sources.length == 0"><a href="#">Link to <span
|
||||
<div>
|
||||
<ul class="uk-padding-small uk-padding-remove-bottom" uk-tab>
|
||||
<li
|
||||
[class.uk-active]="showOptions.basketShowSources"
|
||||
(click)="showOptions.basketswitchToSources()"><a
|
||||
href="#">Sources to
|
||||
link
|
||||
({{(sources.length + (inlineEntity?1:0)) |
|
||||
number}})
|
||||
</a></li>
|
||||
<li [class.uk-disabled]="sources.length == 0" [class.uk-active]="showOptions.basketShowLinksTo"
|
||||
(click)="showOptions.basketswitchToLinkTo()"><a href="#">Link to <span
|
||||
*ngIf="results.length
|
||||
> 0">(
|
||||
{{(results.length) | number}})</span></a></li>
|
||||
</ul>
|
||||
<ul class="uk-switcher" >
|
||||
|
||||
<!--<div class="linksbaskettitles uk-padding-small uk-animation-toggle"
|
||||
(click)="showOptions.showBasketSources()"
|
||||
[style.cursor]="(showOptions.show!='source'?'pointer':'default')">
|
||||
<div class="uk-h6 uk-margin-remove portal-color" >
|
||||
SOURCES ({{(sources.length) | number}})
|
||||
<span *ngIf="showOptions.show!='source' && !showOptions.basketShowSources"
|
||||
class="uk-icon"><svg width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-left"
|
||||
ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
<span *ngIf="showOptions.show!='source' && showOptions.basketShowSources"
|
||||
class="uk-icon"><svg width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-down"
|
||||
ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
|
||||
</div>
|
||||
Research results to link
|
||||
</div>-->
|
||||
<li>
|
||||
|
||||
<div
|
||||
class=" uk-margin-remove-top uk-height-medium uk-overflow-auto ">
|
||||
<div class=" uk-padding-small " style="min-height: 17px;">
|
||||
<!-- <div *ngIf="showOptions.show != 'source'" class="uk-text-center">
|
||||
<a (click)="showOptions.showSource()">
|
||||
<!–span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="1"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg></span–>
|
||||
Edit sources</a>
|
||||
</div>-->
|
||||
<div *ngIf="showOptions.show == 'source'" class=" uk-padding-small " style="min-height:
|
||||
17px;">
|
||||
<start-over *ngIf="showOptions.show == 'source' && (sources.length)> 0"
|
||||
[results]="sources"
|
||||
[localStoragePrefix]="localStoragePrefix+'sources'"
|
||||
|
@ -181,81 +110,28 @@
|
|||
</div>
|
||||
<div class="uk-animation-slide-top-small uk-padding-small">
|
||||
|
||||
<div *ngIf="(sources.length) == 0 " class=" uk-text-center">
|
||||
<div *ngIf="(sources.length) == 0 && !inlineEntity " class=" uk-text-center">
|
||||
No Sources added yet. Start adding sources from the left panel. Or upload a DOI's CSV file.
|
||||
</div>
|
||||
<div *ngIf="sources.length >= basketLimit "
|
||||
class="uk-alert uk-alert-warning uk-text-center">
|
||||
Basket reached the size limit. No more sources can be added.
|
||||
</div>
|
||||
<claim-selected-results [results]="sources"
|
||||
<claim-selected-results *ngIf="inlineEntity" [results]="[inlineEntity]"
|
||||
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
|
||||
[enableRemove]="false">
|
||||
</claim-selected-results>
|
||||
<claim-selected-results *ngIf="sources.length > 0" [results]="sources"
|
||||
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
|
||||
[enableRemove]="true">
|
||||
</claim-selected-results>
|
||||
<div id="test1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<!--<div *ngIf="inlineEntity"
|
||||
class="linkInlineEntity uk-padding-small">
|
||||
<div class="uk-h6 linkInlineEntity uk-margin-small-bottom ">
|
||||
SOURCE
|
||||
|
||||
</div>
|
||||
<claim-title [entity]="inlineEntity" [slice]="true" [sliceSize]="45"
|
||||
[shortVersion]="true"></claim-title>
|
||||
<div class="uk-margin-small-top">
|
||||
<span class="uk-label custom-label linkInlineEntityLabel"
|
||||
title="Type">{{inlineEntity.type}}</span>
|
||||
<span *ngIf="inlineEntity.project">
|
||||
<span class="uk-label custom-label linkInlineEntityLabel"
|
||||
title="Funder">{{inlineEntity.project.funderName}}</span>
|
||||
<!– <span class="uk-label custom-label " title="Type">{{inlineEntity.type}}</span>–>
|
||||
</span>
|
||||
<span *ngIf="inlineEntity.result">
|
||||
<span class="uk-label custom-label linkInlineEntityLabel "
|
||||
title="Access mode">{{inlineEntity.result.accessRights}}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>-->
|
||||
<li>
|
||||
<div >
|
||||
<!-- <div class=" linksbaskettitles uk-padding-small uk-animation-toggle" (click)="showOptions.basketShowLinksTo=!showOptions.basketShowLinksTo;
|
||||
showOptions.basketShowSources=!showOptions.basketShowLinksTo ">
|
||||
<div *ngIf="!inlineEntity"> <!–Enable toggle –>
|
||||
<span class="uk-h6 uk-margin-remove portal-color" >
|
||||
LINK TO ({{(results.length) | number}})
|
||||
<span *ngIf="!showOptions.basketShowLinksTo" class="uk-icon"><svg width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-left"
|
||||
ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03"
|
||||
points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
<span *ngIf="showOptions.basketShowLinksTo" class="uk-icon"><svg width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-down"
|
||||
ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03"
|
||||
points="16 7 10 13 4 7"></polyline></svg></span>
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="inlineEntity"> <!–Inline Entity - no toggle –>
|
||||
<span class="uk-h6 uk-margin-remove portal-color">
|
||||
LINK TO ({{(results.length) | number}})
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="linksBasketSubtitles">
|
||||
Entities to link with the sources
|
||||
</div>
|
||||
</div>-->
|
||||
<div
|
||||
class="uk-height-medium uk-overflow-auto">
|
||||
<div *ngIf=" (results.length)> 0 || showOptions.show=='result'"
|
||||
|
@ -288,28 +164,25 @@
|
|||
</ul>
|
||||
|
||||
<div *ngIf="showOptions.show=='source'"
|
||||
[class]="((sources.length)>0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-padding-small'"
|
||||
(click)="openSelectionModal(); ">
|
||||
<!--show = linkTo; basketShowSources=false;
|
||||
basketShowLinksTo=true;-->
|
||||
<div class="uk-h6 uk-margin-remove portal-color">CONTINUE TO - LINK TO <span
|
||||
*ngIf="results.length > 0">({{(results.length) | number}})</span>
|
||||
[class]="((sources.length)>0?'uk-background-secondary uk-light ':'uk-disabled uk-background-muted ')+ ' linksbaskettitles uk-padding-small'"
|
||||
(click)="stepHasChanged('source') ">
|
||||
<div class=" uk-margin-remove uk-text-center">
|
||||
STEP 2 - LINK SOURCES TO ENTITIES
|
||||
<span class="uk-icon uk-float-right uk-text-bold uk-margin-small-right">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-right" ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
|
||||
points="7 4 13 10 7 16"></polyline></svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="linksBasketSubtitles">
|
||||
Entities to link with the sources
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="showOptions.show!='source'"
|
||||
[class]="((results.length)>0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-margin-small-top uk-padding-small'"
|
||||
style="height:auto !important; " (click)="showOptions.show = 'claim'; scrollUp();">
|
||||
[class]="((results.length)>0?'uk-background-secondary uk-light ':'uk-disabled uk-background-muted ')+
|
||||
' linksbaskettitles uk-margin-small-top uk-padding-small'"
|
||||
style="height:auto !important; " (click)="stepHasChanged('source')">
|
||||
|
||||
<div class="uk-margin-remove portal-color uk-text-center">
|
||||
FINISH LINKING
|
||||
<div class="uk-margin-remove uk-text-center">
|
||||
STEP {{inlineEntity?'2':'3'}} - FINALISE AND FINISH
|
||||
<span class="uk-icon uk-float-right uk-text-bold uk-margin-small-right">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-right" ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
|
||||
|
@ -320,6 +193,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="basketStickBottom"></div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, Input, ViewChild} from '@angular/core';
|
||||
import {ChangeDetectorRef, Component, Input, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||
|
@ -12,6 +12,7 @@ import {PiwikService} from "../../utils/piwik/piwik.service";
|
|||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
||||
import {MetricsService} from "../../services/metrics.service";
|
||||
|
||||
declare var UIkit:any;
|
||||
|
||||
|
@ -19,18 +20,8 @@ declare var UIkit:any;
|
|||
selector: 'linking-generic',
|
||||
templateUrl: 'linkingGeneric.component.html',
|
||||
styles:[ `
|
||||
.mat-stepper-horizontal-line {
|
||||
border-top-width: 1px;
|
||||
border-top-style: solid;
|
||||
flex: auto;
|
||||
height: 0;
|
||||
margin: 0 -16px;
|
||||
margin-left: -16px;
|
||||
min-width: 32px;
|
||||
}
|
||||
.mat-horizontal-stepper-header::before, .mat-horizontal-stepper-header::after, .mat-stepper-horizontal-line {
|
||||
border-top-color: rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
|
||||
|
||||
`]
|
||||
|
||||
|
@ -63,7 +54,7 @@ export class LinkingGenericComponent {
|
|||
|
||||
constructor (private _router: Router, private route: ActivatedRoute, private entitySearch:EntitiesSearchService,
|
||||
private _meta: Meta, private _title: Title, private _piwikService:PiwikService,
|
||||
private seoService: SEOService, private helper: HelperService ) {
|
||||
private seoService: SEOService, private helper: HelperService, private cdr: ChangeDetectorRef ) {
|
||||
}
|
||||
subscriptions = [];
|
||||
|
||||
|
@ -74,8 +65,8 @@ export class LinkingGenericComponent {
|
|||
}
|
||||
this.showOptions.show = 'source';
|
||||
if(this.inlineEntity){
|
||||
this.showOptions.basketShowSources = false;
|
||||
this.showOptions.basketShowLinksTo = true;
|
||||
this.showOptions.showLinkTo();
|
||||
// this.showOptions.basketShowLinksTo = true;
|
||||
this.showOptions.show = this.showOptions.linkTo;
|
||||
}
|
||||
|
||||
|
@ -161,4 +152,52 @@ export class LinkingGenericComponent {
|
|||
private updateUrl(url:string) {
|
||||
this._meta.updateTag({content:url},"property='og:url'");
|
||||
}
|
||||
|
||||
stepHasChanged(stepId){
|
||||
|
||||
if(stepId == 'source'){
|
||||
console.log("show source")
|
||||
this.showOptions.showSource();
|
||||
}else if(stepId == 'target'){
|
||||
console.log("show target")
|
||||
this.showOptions.show = this.showOptions.linkTo;
|
||||
this.showOptions.showLinkTo();
|
||||
}else if(stepId == 'claim'){
|
||||
console.log("show target")
|
||||
this.showOptions.show = 'claim';
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
console.log('stepHasChanged', stepId, this.showOptions.show)
|
||||
}
|
||||
|
||||
stepStatus(stepId){
|
||||
if(stepId == 'source'){
|
||||
if(this.showOptions.show == 'source'){
|
||||
return 'active';
|
||||
}else if(this.sources.length > 0){
|
||||
return 'done';
|
||||
}else{
|
||||
return 'default';
|
||||
}
|
||||
}else if(stepId=='target'){
|
||||
if(this.showOptions.show != 'source' && this.showOptions.show != 'claim'){
|
||||
return 'active';
|
||||
}else if(this.results.length > 0){
|
||||
return 'done';
|
||||
}else if(this.sources.length == 0){
|
||||
return 'disabled';
|
||||
}else{
|
||||
return 'default';
|
||||
}
|
||||
}else if(stepId=='claim'){
|
||||
if(this.showOptions.show == 'claim'){
|
||||
return 'active';
|
||||
}else if(this.results.length > 0 && (this.inlineEntity || this.sources.length > 0)){
|
||||
return 'default';
|
||||
}else if(!(this.results.length > 0 && (this.inlineEntity || this.sources.length > 0))){
|
||||
return 'disabled';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import {ClaimEntitiesMetadataModule} from "./selected/ClaimEntitiesMetadata.modu
|
|||
import {AlertModalModule} from '../../utils/modal/alertModal.module';
|
||||
import {PiwikServiceModule} from "../../utils/piwik/piwikService.module";
|
||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {StepperModule} from "../../sharedComponents/stepper/stepper.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -31,7 +32,7 @@ import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
|||
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule,
|
||||
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule,
|
||||
PiwikServiceModule,
|
||||
MatSelectModule, BreadcrumbsModule
|
||||
MatSelectModule, BreadcrumbsModule, StepperModule
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
declarations: [
|
||||
|
|
|
@ -8,16 +8,16 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
|||
<div *ngIf="entity.type == 'project' && entity.project" class="uk-grid uk-margin-remove-top uk-text-small">
|
||||
<div class="uk-width-1-2">
|
||||
<div *ngIf="entity.project.funderName">
|
||||
<span class="uk-text-muted">Funder </span>{{entity.project.funderName}}
|
||||
<span class="uk-text-muted uk-margin-small-right">Funder: </span>{{entity.project.funderName}}
|
||||
</div>
|
||||
<div *ngIf="entity.project.code">
|
||||
<span class="uk-text-muted uk-margin-small-right">GrandID: </span>{{entity.project.code}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<div *ngIf="entity.project.code">
|
||||
<span class="uk-text-muted">GrandId </span>{{entity.project.code}}
|
||||
</div>
|
||||
<div *ngIf=" !shortVersion && (entity.project.startDate || entity.project.endDate)">
|
||||
<span
|
||||
class="uk-text-muted">Duration </span>{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
|
||||
class="uk-text-muted uk-margin-small-right">Duration: </span>{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,23 +6,23 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
|||
template:
|
||||
`
|
||||
<div *ngIf="entity.result">
|
||||
<div *ngIf="entity.result.authors && entity.result.authors.length >0 " class="uk-text-small">
|
||||
<span class="uk-text-muted">Authors </span>
|
||||
<div *ngIf="entity.result.authors && entity.result.authors.length >0 " class="uk-text-small uk-margin-small-bottom">
|
||||
<span class="uk-text-muted uk-margin-small-right">Authors: </span>
|
||||
{{sliceArray(entity.result.authors)}}
|
||||
</div>
|
||||
<div *ngIf="!shortVersion && entity.result.editors&& entity.result.editors.length > 0" class="uk-text-small">
|
||||
<span class="uk-text-muted">Editors </span>
|
||||
<div *ngIf="!shortVersion && entity.result.editors&& entity.result.editors.length > 0" class="uk-text-small uk-margin-small-bottom">
|
||||
<span class="uk-text-muted uk-margin-small-right">Editors: </span>
|
||||
{{sliceArray(entity.result.editors)}}
|
||||
</div>
|
||||
<div *ngIf="!shortVersion" class="uk-grid uk-margin-remove uk-text-small">
|
||||
<div class="uk-width-1-2 uk-padding-remove-left">
|
||||
<div class="uk-width-1-2 uk-padding-remove-left ">
|
||||
<span *ngIf="entity.result.publisher!=null"><span
|
||||
class="uk-text-muted">Publisher</span> {{entity.result.publisher}}</span>
|
||||
class="uk-text-muted uk-margin-small-right uk-margin-small-bottom">Publisher: </span> {{entity.result.publisher}}</span>
|
||||
<span *ngIf="entity.result.journal!=null"><span
|
||||
class="uk-text-muted">Journal</span> {{entity.result.journal}}</span>
|
||||
class="uk-text-muted uk-margin-small-right uk-margin-small-bottom">Journal: </span> {{entity.result.journal}}</span>
|
||||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<span *ngIf="entity.result.date"><span class="uk-text-muted">Published in </span> <span
|
||||
<span *ngIf="entity.result.date"><span class="uk-text-muted uk-margin-small-right uk-margin-small-bottom">Published: </span> <span
|
||||
[class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{entity.result.date}}</span></span>
|
||||
<div [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{getProjectDurationMessage(entity)}}
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@ import {StringUtils} from "../../../utils/string-utils.class";
|
|||
selector: 'claim-title',
|
||||
template:
|
||||
`
|
||||
<span class="uk-text-bold">
|
||||
<div class="uk-margin-bottom" [class.uk-h6]="!shortVersion" [class.uk-text-bold]="shortVersion">
|
||||
<a *ngIf="entity.result && entity.result.url" target="_blank" [href]="entity.result.url"
|
||||
class="uk-link">{{entity.title ? sliceString(entity.title) : '[No title available]'}}</a>
|
||||
<span
|
||||
|
@ -39,7 +39,7 @@ import {StringUtils} from "../../../utils/string-utils.class";
|
|||
</span>
|
||||
<span> {{entity.context.concept.label}}</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
`
|
||||
|
||||
|
||||
|
|
|
@ -10,31 +10,23 @@
|
|||
|
||||
<div class="uk-margin-top">
|
||||
<div class="uk-grid ">
|
||||
<div class="uk-grid uk-width-expand uk-child-width-1-2@m uk-child-width-1-1@s">
|
||||
<div
|
||||
class=" uk-width-expand uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-width-expand uk-padding ">
|
||||
<div
|
||||
class=" uk-grid uk-grid-divider uk-child-width-1-2@m uk-child-width-1-1@s uk-padding-remove-left ">
|
||||
<!-- Sources-->
|
||||
<div>
|
||||
<div class="">
|
||||
<div class=" uk-margin uk-animation-toggle">
|
||||
<span class="uk-h6 uk-text-primary "> SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
|
||||
<!--<span *ngIf="!showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
|
||||
ratio="1"><polyline fill="none" stroke="#000"
|
||||
stroke-width="1.03"
|
||||
points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
<span *ngIf="showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" icon="chevron-down"
|
||||
ratio="1"><polyline fill="none" stroke="#000"
|
||||
stroke-width="1.03"
|
||||
points="16 7 10 13 4 7"></polyline></svg></span>-->
|
||||
<span class="uk-h6 "> SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
|
||||
</span>
|
||||
<a class="uk-float-right" (click)="showOptions.showSource() "> <span
|
||||
<a *ngIf="!inlineEntity" class="uk-float-right" (click)="showOptions.showSource() "> <span
|
||||
uk-icon="pencil"></span>Edit
|
||||
sources</a>
|
||||
</div>
|
||||
<ul *ngIf="inlineEntity" class="uk-list uk-animation-fade">
|
||||
<li
|
||||
[class]="((inlineEntity.warningMessages.length > 0)?' warningBorder ':'')+
|
||||
+((inlineEntity.errorMessages.length > 0)?' dangerBorder ':'') +
|
||||
' uk-alert'" >
|
||||
<ul *ngIf="inlineEntity" class="uk-list uk-animation-fade uk-list-divider">
|
||||
<li>
|
||||
<div class="uk-grid uk-text-small">
|
||||
<div class="uk-text-muted uk-width-1-2">
|
||||
{{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}
|
||||
|
@ -47,7 +39,7 @@
|
|||
<!-- {{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}-->
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<claim-title [entity]="inlineEntity"></claim-title>
|
||||
<claim-title [shortVersion]="true" [entity]="inlineEntity"></claim-title>
|
||||
</div>
|
||||
<claim-result-metadata [entity]="inlineEntity"></claim-result-metadata>
|
||||
<claim-project-metadata [entity]="inlineEntity"></claim-project-metadata>
|
||||
|
@ -56,17 +48,13 @@
|
|||
<div *ngIf="!inlineEntity && sources.length == 0 ">
|
||||
|
||||
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
|
||||
<span class="uk-text-bold uk-text-danger"> SOURCES cannot be empty.</span>
|
||||
<span class="uk-text-bold uk-text-danger"> SOURCES cannot be empty.</span><br>
|
||||
Start by adding your linking sources first, go to <a (click)="showOptions.showSource() " class="uk-link">
|
||||
sources
|
||||
page</a>.
|
||||
step 1</a>.
|
||||
</div>
|
||||
</div>
|
||||
<ul *ngIf="!inlineEntity && sources.length > 0 " class="uk-list uk-animation-fade">
|
||||
<li *ngFor=" let entity of sources "
|
||||
[class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
|
||||
+((entity.errorMessages.length > 0)?' dangerBorder ':'') +
|
||||
' uk-alert'">
|
||||
<ul *ngIf="!inlineEntity && sources.length > 0 " class="uk-list uk-animation-fade uk-list-divider">
|
||||
<li *ngFor=" let entity of sources ">
|
||||
<!-- <div class="uk-text-muted">-->
|
||||
<!-- {{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}-->
|
||||
<!-- </div>-->
|
||||
|
@ -80,7 +68,7 @@
|
|||
</div>
|
||||
<div class="uk-grid uk-margin-remove-top">
|
||||
<div class="uk-width-expand">
|
||||
<claim-title [entity]="entity"></claim-title>
|
||||
<claim-title [shortVersion]="true" [entity]="entity"></claim-title>
|
||||
<claim-result-metadata [entity]="entity"></claim-result-metadata>
|
||||
<claim-project-metadata [entity]="entity"></claim-project-metadata>
|
||||
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
|
||||
|
@ -153,12 +141,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class=" uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
|
||||
<a class=" uk-icon-button "
|
||||
<a class=" uk-link "
|
||||
(click)="remove(entity, false)">
|
||||
<span class="uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"
|
||||
ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
|
||||
</span>
|
||||
<span uk-icon="close"> </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -168,68 +153,27 @@
|
|||
</ul>
|
||||
</div>
|
||||
<!-- Results-->
|
||||
<div>
|
||||
<div class=" ">
|
||||
<div class=" uk-margin " >
|
||||
<span class=" uk-h6 uk-text-primary"> LINK TO ({{results.length | number}})</span>
|
||||
<span class=" uk-h6 "> LINK TO ({{results.length | number}})</span>
|
||||
|
||||
|
||||
<a class="uk-float-right" (click)="showOptions.show = 'sources';"> <span
|
||||
<a class="uk-float-right" (click)="showOptions.showLinkTo()"> <span
|
||||
uk-icon="pencil"></span>Edit
|
||||
entities</a>
|
||||
</div>
|
||||
<div *ngIf="results.length == 0">
|
||||
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
|
||||
<span class="uk-text-bold uk-text-danger"> LINK TO list cannot be empty.</span>
|
||||
Select an entity type to link to:
|
||||
<div class="uk-grid uk-text-center uk-margin-expand uk-padding-small uk-child-width-1-3 uk-width-large uk-margin-auto ">
|
||||
<span class="uk-text-bold uk-text-danger"> LINK TO list cannot be empty.</span><br>
|
||||
Start by adding sources to link to first, go to <a (click)="showOptions.showLinkTo() "
|
||||
class="uk-link">
|
||||
step 2</a>.
|
||||
|
||||
<div *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
|
||||
(click)="goTo('project')"
|
||||
style="cursor:pointer;">
|
||||
<button class="uk-icon-button portal-button">
|
||||
<span class="uk-icon">
|
||||
<svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
|
||||
xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
|
||||
height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
|
||||
width="17" x="1.5" y="6.5"></rect></svg></span>
|
||||
</button>
|
||||
<div>Projects</div>
|
||||
</div>
|
||||
<div *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " (click)="goTo('result')"
|
||||
style="cursor:pointer;">
|
||||
<button class="uk-icon-button portal-button">
|
||||
<span class="uk-icon">
|
||||
<svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
|
||||
xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
|
||||
width="12" x="3.5" y="2.5"></rect><polyline
|
||||
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
|
||||
</button>
|
||||
<div>Research results</div>
|
||||
</div>
|
||||
<div *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 "
|
||||
(click)="goTo('context')"
|
||||
style="cursor:pointer;">
|
||||
<button class="uk-icon-button portal-button">
|
||||
<span class="uk-icon">
|
||||
<svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
|
||||
xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
|
||||
stroke="#000" stroke-width="1.1"></circle><path
|
||||
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" fill="none"
|
||||
stroke="#000" stroke-width="1.1"></path><path
|
||||
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"
|
||||
fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
|
||||
</button>
|
||||
<div>Communities</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul *ngIf="results.length > 0 " class="uk-list uk-animation-fade">
|
||||
<ul *ngIf="results.length > 0 " class="uk-list uk-animation-fade uk-list-divider">
|
||||
<li *ngFor=" let entity of results "
|
||||
[class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
|
||||
+((entity.errorMessages.length > 0)?' dangerBorder ':'') +
|
||||
' uk-alert'" style="z-index: 0 !important;">
|
||||
style="z-index: 0 !important;">
|
||||
<div class="uk-grid uk-text-small">
|
||||
<div class="uk-text-muted uk-width-1-2">
|
||||
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
|
||||
|
@ -242,7 +186,7 @@
|
|||
<div class="uk-grid uk-margin-remove-top">
|
||||
<div class="uk-width-expand">
|
||||
|
||||
<claim-title [entity]="entity"></claim-title>
|
||||
<claim-title [shortVersion]="true" [entity]="entity"></claim-title>
|
||||
<claim-result-metadata [entity]="entity"></claim-result-metadata>
|
||||
<claim-project-metadata [entity]="entity"></claim-project-metadata>
|
||||
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
|
||||
|
@ -298,12 +242,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
|
||||
<a class="uk-icon-button "
|
||||
<a class="uk-link "
|
||||
(click)="remove(entity, true)">
|
||||
<span class="uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"
|
||||
ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
|
||||
</span>
|
||||
<span uk-icon="close"> </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -312,10 +253,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1 uk-padding-remove-left ">
|
||||
<div
|
||||
[class]="((defaultColors)?'linkingToolbar':'communityPanelBackground')+' uk-padding-small'">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-padding-small">
|
||||
[class]="((results.length > 0 && (sources.length > 0 || inlineEntity))?'uk-background-secondary uk-light':'uk-background-muted uk-disabled ')+' uk-padding-small'">
|
||||
<div class="">
|
||||
<div class="uk-grid uk-flex uk-flex-center">
|
||||
|
||||
|
||||
|
|
|
@ -10,10 +10,8 @@
|
|||
<claim-project-metadata [entity]="entity" [slice]="true" [sliceSize]="5" [shortVersion]="true"></claim-project-metadata>
|
||||
</div>
|
||||
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left" *ngIf="enableRemove">
|
||||
<a class=" uk-icon-button " (click)="remove(entity)" >
|
||||
<span class="uk-icon" >
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus" ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
|
||||
</span>
|
||||
<a class=" uk-link " (click)="remove(entity)" >
|
||||
<span uk-icon="close"> </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,15 +11,15 @@
|
|||
<ng-container *ngTemplateOutlet="input_label_wrapper; context: {filter: filter, value: value}"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf=" addShowMore && (filter.values.length) > filterValuesNum">
|
||||
<a *ngIf="filterValuesNum > 0"
|
||||
[class]="((isDisabled)?'uk-disabled uk-link-muted ':' portal-link ') + ' uk-margin-small-top'"
|
||||
[attr.uk-toggle]="'target: #toggle-'+filter.filterId" (click)="toggle()">
|
||||
<div *ngIf=" addShowMore && (filter.values.length) > filterValuesNum ">
|
||||
<span *ngIf="filterValuesNum > 0 "
|
||||
[class]="' uk-link ' + ((isDisabled)?'uk-disabled uk-link-muted ':' portal-link ') + ' uk-margin-small-top'"
|
||||
(click)="toggle()">
|
||||
<span *ngIf="!isOpen">+ View all</span>
|
||||
<!-- <span *ngIf="isOpen">- View less</span>-->
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div hidden [id]="'toggle-'+filter.filterId" class="uk-text-small uk-margin-small-bottom">
|
||||
<div [class.uk-hidden]="!isOpen" [id]="'toggle-'+filter.filterId" class="uk-text-small uk-margin-small-bottom">
|
||||
<div class="">
|
||||
<span class="uk-text-meta uk-margin-small-left">Top 100 values are
|
||||
shown in the filters</span>
|
||||
|
@ -31,13 +31,13 @@
|
|||
<span *ngIf="showResultCount === true"
|
||||
class="uk-width-1-3@m uk-width-2-5@s uk-padding-small uk-padding-remove-vertical uk-padding-remove-right">
|
||||
<span class="uk-width-1-4 uk-text-muted"> Sort by:</span>
|
||||
<select [(ngModel)]="sortBy"
|
||||
<!-- <select [(ngModel)]="sortBy"
|
||||
class=" uk-width-expand uk-select uk-hidden@m uk-form-small"
|
||||
id="form-horizontal-select" name="select_order">
|
||||
<option value="num">Results number</option>
|
||||
<option value="name">Name</option>
|
||||
</select>
|
||||
<mat-select [(ngModel)]="sortBy"
|
||||
</select>-->
|
||||
<mat-select [(ngModel)]="sortBy" (ngModelChange)="sort(filter.values)"
|
||||
class="uk-width-expand matSelection uk-visible@m"
|
||||
id="form-horizontal-select1" name="select_order"
|
||||
[disableOptionCentering]="true" panelClass="matSelectionPanel">
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
<div class="uk-overflow-auto uk-height-max-small uk-padding-remove
|
||||
uk-margin-small-left uk-margin-small-right uk-margin-small-top uk-width-1-1">
|
||||
<ng-container *ngFor="let value of sort(filter.values)">
|
||||
<ng-container *ngFor="let value of this.sortedValues">
|
||||
<div *ngIf="filterKeywords(value.name)" title="{{value.name}}"
|
||||
class="uk-animation-fade filterItem searchFilterItem uk-text-small">
|
||||
<ng-container
|
||||
|
@ -59,10 +59,11 @@
|
|||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<a *ngIf="filterValuesNum > 0" [class]="(isDisabled)?'uk-disabled uk-link-muted ':' portal-link '"
|
||||
[attr.uk-toggle]="'target: #toggle-'+filter.filterId" (click)="toggle()">
|
||||
<span *ngIf="filterValuesNum > 0 && filterValuesNum !=0"
|
||||
[class]="' uk-link '+ ((isDisabled)?'uk-disabled uk-link-muted ':' portal-link ')"
|
||||
(click)="toggle()">
|
||||
<span *ngIf="isOpen">- View less</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -32,14 +32,14 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
|||
@Output() modalChange = new EventEmitter();
|
||||
@Output() onFilterChange = new EventEmitter();
|
||||
keyword = "";
|
||||
sortBy = "name";
|
||||
sortBy: "name" | "num" = "name";
|
||||
queryParams = {};
|
||||
paramPosition = 0;
|
||||
@Input() actionRoute: boolean = false;
|
||||
@Input() quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string };
|
||||
sub;
|
||||
public isOpen: boolean = false;
|
||||
|
||||
sortedValues;
|
||||
constructor(private _router: Router, private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
|
@ -50,11 +50,18 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(this.filterValuesNum == 0){
|
||||
this.isOpen = true;
|
||||
this.sortBy = "num";
|
||||
}else{
|
||||
this.isOpen = false;
|
||||
}
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
this.queryParams = Object.assign({}, params);
|
||||
this.paramPosition = SearchFields.getParameterOrder(this.filter.filterId, this.getEntries(params));
|
||||
});
|
||||
this.filter.values = this.filter.values.filter(value => !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available'));
|
||||
this.sort(this.filter.values);
|
||||
if (this.filter.filterType == "radio") {
|
||||
this.filter.radioValue = "";
|
||||
this.filter.values.forEach(value => {
|
||||
|
@ -236,11 +243,13 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
|||
return 0;
|
||||
});
|
||||
}
|
||||
return sorted;
|
||||
event.stopPropagation();
|
||||
this.sortedValues = Object.assign(sorted);
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.isOpen = !this.isOpen;
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
disabled(value) {
|
||||
|
|
Loading…
Reference in New Issue