Linking: add new inputs, update paging style

This commit is contained in:
argirok 2022-04-08 16:55:22 +03:00
parent 87aa186ea8
commit 4bc50b8b4f
11 changed files with 81 additions and 289 deletions

View File

@ -2,39 +2,22 @@
<div>
<div class="uk-grid uk-margin-top uk-animation-fade">
<div class="uk-width-expand">
<div class="uk-grid uk-flex uk-flex-middle">
<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 class="uk-display-inline-block">
<advanced-search-input (searchEmitter)="$event">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions"></div>
<div input type="text" [(value)]="keyword" placeholder="Entities to link" [hint]="'Search for ' + openaireEntities.COMMUNITIES + '...'"></div>
</advanced-search-input>
</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':''">
<span [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-margin-small-bottom uk-margin-small-right '+getCommunityClass(community)"
(click)="select(community)" style="cursor:pointer;">
<a href="#modal-categories" uk-toggle>
{{community.label}}
</a>
</span>
</span>
<span *ngFor="let community of communities" [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''">
<span [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-margin-small-bottom uk-margin-small-right '+getCommunityClass(community)"
(click)="select(community)" style="cursor:pointer;">
<a href="#modal-categories" uk-toggle>
{{community.label}}
</a>
</span>
</span>
</div>
<!-- Categories modal-->
@ -185,8 +168,7 @@
</li>
</ul>
<!-- </li>
</ul> -->
<p class="">
<button class="uk-button uk-button-default uk-modal-close uk-margin-right uk-margin-top uk-align-right"
type="button">Close
@ -195,108 +177,7 @@
</div>
</div>
<!-- <div class="uk-text-large">Select a community <helper div="link-context-form" tooltip=true></helper> </div>
<select [(ngModel)]="selectedCommunityId" (ngModelChange)="communityChanged()" class="uk-margin-large-bottom uk-select uk-width-medium " name="select_funder" >
<option value="0" >Select community</option>
<option *ngFor="let community of communities" [value]="community.id" >{{community.label}}</option>
</select> -->
<!--div class="uk-text-large">and then</div>
<div class=" uk-margin-left uk-margin-left">
<div class=" uk-text-bold">search for community concepts</div>
<table class="uk-margin-remove uk-width-1-1 uk-table uk-table-responsive" ><tr>
<tr>
<td *ngIf="selectedCommunityId != '0' && categories.length > 0" class="uk-width-medium">
<select [(ngModel)]="selectedCategoryId" (ngModelChange)="categoryChanged()" class="uk-select uk-width-medium " name="select_funder" >
<option value="0" >Select category</option>
<option *ngFor="let category of categories" [value]="category.id" >{{category.label}}</option>
</select>
</td><td >
<static-autocomplete [(properties)]=properties [(list)] = concepts [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Concept name'" title = "Concepts" [multipleSelections]=true (addItem) = "select($event)" > </static-autocomplete>
</td></tr>
</table>
</div-->
<!-- <div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
<div *ngIf="error" class="uk-alert uk-alert-warning" role="alert">An error occured while loading communities...</div>
<div class="uk-text-large ">or</div>
<div class=" uk-text-bold uk-margin-bottom uk-margin-left">browse through community categories:
<button uk-toggle="target: #browse; animation: uk-animation-fade" class="uk-button portal-button"> Browse </button>
</div> -->
<div class="uk-margin-left">
<!-- <div id="browse" class=" uk-margin-small">
<div *ngIf="selectedCommunityId =='0'" class="uk-alert uk-alert-warning" >Please select community first...</div>
<div *ngIf="selectedCommunityId !='0'" class="uk-panel uk-panel-scrollable">
<ul class="uk-list ">
<li>
<span (click)="displaySubcategory(selectedCommunityId)" >
<span *ngIf="!conceptsClassDisplay[selectedCommunityId]" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[selectedCommunityId]" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>{{selectedCommunityLabel}}
</span>
<a *ngIf="!isSelected(selectedCommunityId)" (click)="addNewContext(selectedCommunityLabel,null,{'id':selectedCommunityId, 'label':selectedCommunityLabel})" class="uk-icon-button icon-button-small uk-icon">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span> </a>
<span *ngIf="isSelected(selectedCommunityId)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<ul *ngIf="conceptsClassDisplay[selectedCommunityId]" class="uk-animation-fade" >
<li *ngFor="let category of categories" >
<span (click)="browseConcepts(category.id)" >
<span *ngIf="!conceptsClassDisplay[category.id]" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[category.id]" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
{{category.label}}</span><a *ngIf="!isSelected(category.id)" (click)="addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label})" class="uk-icon-button icon-button-small" >
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(category.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary" role="alert">Loading category information...</div>
<ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]" class="uk-list uk-animation-fade" id="ul_{{category.id}}" >
<li *ngFor="let concept1 of conceptsClass[category.id]" >
<span (click)="displaySubcategory(concept1.id)" >
<span *ngIf="!conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
{{concept1.label}}
</span>
<a *ngIf="!isSelected(concept1.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept1)" class="uk-icon-button icon-button-small"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept1.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<ul *ngIf="concept1.concepts && conceptsClassDisplay[concept1.id] " class="uk-animation-fade" >
<li *ngFor="let concept2 of concept1.concepts"><span (click)="displaySubcategory(concept2.id)" >
<span *ngIf="!conceptsClassDisplay[concept2.id] && concept2.concepts" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[concept2.id] && concept2.concepts" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
{{concept2.label}}</span>
<a *ngIf="!isSelected(concept2.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept2)" class="uk-icon-button icon-button-small"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept2.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<ul *ngIf="concept2.concepts && conceptsClassDisplay[concept2.id] " class="uk-animation-fade" >
<li *ngFor="let concept3 of concept2.concepts">{{concept3.label}}
<a *ngIf="!isSelected(concept3.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept3)" class="uk-icon-button icon-button-small"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept3.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</ul>
</div>
</div> -->
</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="infoMessage.length > 0" class="uk-alert uk-alert-primary" role="alert">{{infoMessage}}</div>

View File

@ -1,11 +1,12 @@
import {Component, Input} from '@angular/core';
import {Router} from '@angular/router';
import {ContextsService} from './service/contexts.service';
import {ClaimEntity} from './claimHelper.class';
import {ClaimEntity, ShowOptions} from './claimHelper.class';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {EnvProperties} from '../../utils/properties/env-properties';
import {Subscriber} from "rxjs";
import {OpenaireEntities} from "../../utils/properties/searchFields";
declare var UIkit: any;
@ -21,7 +22,7 @@ export class ClaimContextSearchFormComponent {
@Input() communityId: string = null;
@Input() public inlineClaim: boolean = false;
@Input() basketLimit;
@Input() showOptions;
@Input() showOptions:ShowOptions;
public selectedCommunityId: string = "0";
public selectedCategoryId: string = "0";
@ -39,10 +40,12 @@ export class ClaimContextSearchFormComponent {
public loading: boolean = false;
public error: boolean = false;
@Input() localStoragePrefix: string = "";
openaireEntities = OpenaireEntities;
entitiesSelectOptions;
keyword = "";
subscriptions = [];
ngOnInit() {
this.entitiesSelectOptions = this.showOptions.selectOptions;
this.getCommunities();
}
ngOnDestroy() {

View File

@ -6,12 +6,14 @@ import { ClaimContextSearchFormComponent } from './claimContextSearchForm.compon
import { RouterModule } from '@angular/router';
import {HelperModule} from '../../utils/helper/helper.module';
import {ClaimProjectsSearchFormModule} from "./claimProjectSearchForm.module";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
@NgModule({
imports: [
SharedModule, RouterModule,
StaticAutocompleteModule,
HelperModule, ClaimProjectsSearchFormModule
HelperModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule
],
declarations: [

View File

@ -1,5 +1,6 @@
//Classes used in linking / inlinelinking when selecting an entity
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {OpenaireEntities} from "../../utils/properties/searchFields";
export class ClaimResult {
public source: string;
@ -144,7 +145,7 @@ export class ShowOptions {
linkToEntities: string[]; // show linkToEntities /values: result, project, context
basketShowSources: boolean = true;
basketShowLinksTo: boolean = false;
selectOptions= [];
constructor() {
this.show = "source";
this.linkTo = "project";
@ -174,5 +175,17 @@ export class ShowOptions {
}
initSelectOptions(){
let options =[];
if(this.linkToEntities.indexOf('result')!=-1){
options.push({value: 'result',label: OpenaireEntities.RESULTS})
}
if(this.linkToEntities.indexOf('project')!=-1){
options.push({value: 'project',label: OpenaireEntities.PROJECTS})
}
if(this.linkToEntities.indexOf('context')!=-1){
options.push({value: 'context',label: OpenaireEntities.COMMUNITIES})
}
this.selectOptions = options;
}
}

View File

@ -1,23 +1,13 @@
<form class=" uk-margin-top uk-animation ">
<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>
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
placeholder="Search for projects..." aria-describedby="sizing-addon2"
[(ngModel)]="keyword" name="keyword">
</div>
<span class="input-group-btn space">
<button (click)="search(page,size)" type="submit" class=" uk-button portal-button">Search</button>
</span>
</form>
<div class="uk-display-inline-block">
<advanced-search-input (searchEmitter)="search(page,size)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions"></div>
<div input type="text" [(value)]="keyword" placeholder="Entities to link" [hint]="'Search for ' + openaireEntities.PROJECTS + '...'"></div>
</advanced-search-input>
</div>
<div *ngIf="!showResults">
<div class="uk-text-center uk-text-large uk-text-muted uk-margin-large-top">No project results yet... <br>Start
searching for projects to add them in the Basket
searching for {{openaireEntities.PROJECTS.toLowerCase()}} to add them in the Basket
</div>
</div>
<div *ngIf="showResults" class="uk-margin-top">
@ -125,25 +115,10 @@
role="alert"><span class="loading-gif uk-align-center"></span></div>
<claim-results [localStoragePrefix]="localStoragePrefix" [results]=openaireResults
[selectedResults]=selectedProjects [basketLimit]="basketLimit"></claim-results>
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0" class="uk-clearfix ">
<div class= "paging-hr searchPaging uk-margin-small-bottom"
*ngIf="(openaireResultsNum > 0) || (openaireResultsStatus == errorCodes.LOADING)">
<div class="uk-panel uk-margin-small-top uk-grid uk-flex uk-flex-middle">
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="openaireResultsNum > 0">
<span class="uk-text-bold">{{openaireResultsNum|number}}</span>
<span class="uk-text-muted uk-text-uppercase"> projects, page </span>
<span class="uk-text-bold">{{openaireResultsPage | number}}</span>
<span class="uk-text-muted uk-text-uppercase"> of </span>
<span class="uk-text-bold">{{(totalPages(openaireResultsNum)|number)}}</span>
</div>
<div class="float-children-right-at-medium margin-small-top-at-small uk-width-expand uk-padding-remove-left">
<paging-no-load class="uk-float-right" [currentPage]="openaireResultsPage"
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0 && openaireResultsStatus != errorCodes.LOADING " class="uk-flex uk-flex-center ">
<paging-no-load [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"
[size]="size" (pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,7 +7,7 @@ import {ErrorCodes} from '../../utils/properties/errorCodes';
import {StringUtils} from "../../utils/string-utils.class";
import {Filter, Value} from "../../searchPages/searchUtils/searchHelperClasses.class";
import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.class";
import {SearchFields} from "../../utils/properties/searchFields";
import {OpenaireEntities, SearchFields} from "../../utils/properties/searchFields";
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component";
import {Subscriber} from "rxjs";
@ -20,20 +20,10 @@ declare var UIkit:any;
})
export class ClaimProjectsSearchFormComponent {
ngOnInit() {
// this.getFunders();
// this.search(this.page, this.size);
}
// @ViewChild (ModalLoading) loading : ModalLoading ;
// @Input() public inline: boolean = false ; // for claimed started from landing pages
public query = '';
@Input() public selectedProjects:ClaimEntity[]=[] ;
public elementRef;
// public funders:string[];
// public selectedFunderId:string ="0";
// selectedFunderName:string ="Select funder:";
@Output() projectSelected = new EventEmitter();
@Input() public properties:EnvProperties;
@Input() public inlineClaim:boolean=false;
@ -53,23 +43,20 @@ export class ClaimProjectsSearchFormComponent {
keyword:string = '';
showResults = false;
// public openaireRefineFields: string[] = ["relfunder", "relproject", "resultbestaccessright", "instancetypename", "resultlanguagename", "community"];
// public openaireRefineFieldsQuery: string = "&refine=true&fields=funder&fields=projectstartyear&fields=projectendyear&fields=projectecsc39";
public refineFields: string[] = ["funder"];
public refineFieldsQuery: string = "&refine=true&fields=funder";
filters = [];
prevFilters = [];
// startYear = "";
// endYear = "";
public rangeFilters: RangeFilter[] = [];
public searchFields: SearchFields = new SearchFields();
public rangeFields:string[][] = this.searchFields.PROJECT_RANGE_FIELDS;
openaireEntities = OpenaireEntities;
sub;
constructor(private _service: ProjectService, private _projectService: SearchProjectsService, myElement: ElementRef) {
this.elementRef = myElement;
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
}
sub;
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();

View File

@ -18,13 +18,15 @@ import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.mod
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
import {ClaimEntitiesSelectionComponent} from "./claimEntitiesSelection.component";
import {MatSelectModule} from "@angular/material/select";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
@NgModule({
imports: [
SharedModule, CommonModule,
// LoadingModalModule,
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, MatSelectModule
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, MatSelectModule, AdvancedSearchInputModule, InputModule
],
providers:[
],

View File

@ -1,26 +1,15 @@
<form class=" uk-margin-top">
<!-- <div class="uk-margin-small-bottom">Start searching Research Outcomes and add them to the Basket to Link
&lt;!&ndash; <helper div="link-entity-form" styleName="" tooltip=true></helper> &ndash;&gt;
</div>-->
<div *ngIf="showOptions && showOptions.linkToEntities.length > 0" class="uk-display-inline-block">
<advanced-search-input (searchEmitter)="search(true)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions"></div>
<div input type="text" [(value)]="keyword" placeholder="Entities to link" [hint]="'Search for ' + openaireEntities.RESULTS + '...'"></div>
</advanced-search-input>
</div>
<div *ngIf="!showOptions" class="uk-width-large">
<div search-input [(value)]="keyword" [placeholder]="'Search for ' + openaireEntities.RESULTS + '...'" (searchEmitter)="search(true)"></div>
</div>
<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>
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
placeholder="Search for research outcomes..." aria-describedby="sizing-addon2"
[(ngModel)]="keyword" name="keyword">
</div>
<span class="input-group-btn space">
<button (click)="search(true)" type="submit" class=" uk-button uk-button-primary">Search</button>
</span>
<!--helper div="link-entity-form" styleName="uk-width-medium"></helper-->
</form>
<div *ngIf="!showSearchResults">
<div class="uk-text-center uk-text-large uk-text-muted uk-margin-large-top">
No sources yet...<br>Use the searchbar and find linking sources.
@ -55,25 +44,7 @@
</div>
<div *ngIf="crossrefResultsNum != null && crossrefResultsNum > 0" class="uk-clearfix ">
<div class="uk-grid">
<!-- <div *ngIf="crossrefResultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{crossrefResultsNum|number}}</span> research outcomes, page <span
class="portal-color">{{crossrefPage | number}}</span> of <span
class="portal-color">{{countTotalPages(crossrefResultsNum)|number}}</span>
</div>-->
<!-- <div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="crossrefResultsNum > 0">
{{crossrefResultsNum|number}}
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
{{crossrefPage | number}}
<span class="uk-text-muted uk-text-uppercase"> of </span>
{{(countTotalPages(crossrefResultsNum)|number)}}
</div>
<div class="uk-width-1-2 uk-padding-remove-left">
<paging-no-load class="uk-float-right" [currentPage]="crossrefPage" [totalResults]="crossrefResultsNum"
[term]="keyword"
[size]="size" (pageChange)="crossrefPageChange($event)"></paging-no-load>
</div>-->
</div>
</div>
<div *ngIf="crossrefStatus === errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
@ -83,10 +54,12 @@
<claim-results [localStoragePrefix]=localStoragePrefix [results]=crossrefResults
[selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
</div>
<paging-no-load *ngIf="crossrefStatus != errorCodes.LOADING && crossrefResultsNum>0 " class="uk-float-right"
<div class="uk-flex uk-flex-center" *ngIf="crossrefStatus != errorCodes.LOADING && crossrefResultsNum>0 ">
<paging-no-load
[currentPage]="crossrefPage" [totalResults]="crossrefResultsNum"
[term]="keyword"
[size]="size" (pageChange)="crossrefPageChange($event)"></paging-no-load>
</div>
</div>
</div>
<div *ngIf="activeTab == 'openaire'" id="openaire" class="uk-animation-fade">
@ -94,55 +67,7 @@
<div class="uk-grid">
<div class="search-filters uk-width-1-1">
<!--<div *ngIf="countFilters()>0" class="uk-grid uk-flex uk-flex-bottom">
<div class="uk-grid">
<h6 class="uk-text-bold">Filters</h6>
<a *ngIf="countFilters()>1" (click)="clearFilters()"
[class]="((openaireResultsStatus ==
errorCodes.LOADING)?'uk-disabled uk-link-muted':'')+' portal-link '">
Clear All
</a>
</div>
<div *ngIf="countFilters()>0" class="uk-grid uk-grid-small uk-text-small uk-margin-small-top " uk-grid>
<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]="((openaireResultsStatus ==
errorCodes.LOADING)?' 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 *ngFor="let filter of openaireResultsfilters " >
<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) " >
&lt;!&ndash; if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span &ndash;&gt;
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' 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>-->
<ng-container *ngIf="openaireResultsNum > 0">
<ng-container *ngFor="let filter of rangeFilters">
@ -195,8 +120,8 @@
role="alert"><span class="loading-gif uk-align-center">Loading...</span></div>
<claim-results [localStoragePrefix]=localStoragePrefix
[results]=openaireResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
<div class="float-children-right-at-medium margin-small-top-at-small uk-width-expand uk-padding-remove-left" *ngIf=" openaireResultsStatus != errorCodes.LOADING && openaireResultsNum != null && openaireResultsNum > 0" >
<paging-no-load class="uk-float-right" [currentPage]="openaireResultsPage"
<div class="uk-flex uk-flex-center" *ngIf=" openaireResultsStatus != errorCodes.LOADING && openaireResultsNum != null && openaireResultsNum > 0" >
<paging-no-load [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"
[size]="size" (pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
@ -245,9 +170,9 @@
<div *ngIf="orcidResultsNum == 0" class="uk-alert uk-alert-primary uk-margin-top"> No results found</div>
</div>
<div *ngIf=" ((orcidResultsNum >0) && (totalPages > 1) && ( 0 < page && page <= totalPages )) "
class="uk-clearfix">
class="uk uk-flex uk-flex-center">
<paging-no-load class="uk-float-right" [currentPage]="orcidPage" [totalResults]="orcidResultsNum"
<paging-no-load [currentPage]="orcidPage" [totalResults]="orcidResultsNum"
[term]="keyword" [size]="size"
(pageChange)="orcidPageChange($event)"></paging-no-load>
@ -273,8 +198,8 @@
<claim-results [localStoragePrefix]=localStoragePrefix *ngIf="dataciteResults.length > 0 "
[results]=dataciteResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
</div>
<div *ngIf="dataciteResultsNum != null && dataciteResultsNum > 0" class="uk-clearfix ">
<paging-no-load class="uk-float-right" [currentPage]="datacitePage" [totalResults]="dataciteResultsNum"
<div *ngIf="dataciteResultsNum != null && dataciteResultsNum > 0" class="uk uk-flex uk-flex-center ">
<paging-no-load [currentPage]="datacitePage" [totalResults]="dataciteResultsNum"
[term]="keyword"
[size]="size" (pageChange)="datacitePageChange($event)"></paging-no-load>
</div>

View File

@ -11,7 +11,7 @@ import {Filter, Value} from "../../searchPages/searchUtils/searchHelperClasses.c
import {forkJoin, Observable, Subscriber} from 'rxjs';
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component";
import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.class";
import {SearchFields} from "../../utils/properties/searchFields";
import {OpenaireEntities, SearchFields} from "../../utils/properties/searchFields";
@Component({
selector: 'claim-result-search-form',
templateUrl: 'claimResultSearchForm.component.html',
@ -30,7 +30,7 @@ export class ClaimResultSearchFormComponent {
@Input() localStoragePrefix: string = "";
@Input() basketLimit;
@Input() showOptions;
openaireEntities = OpenaireEntities;
public errorCodes: ErrorCodes = new ErrorCodes();
dataciteResults: ClaimEntity[] = [];

View File

@ -18,10 +18,13 @@ import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.mod
import {QuickSelectionsModule} from "../../searchPages/searchUtils/quick-selections.module";
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
import {ClaimProjectsSearchFormModule} from "./claimProjectSearchForm.module";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
@NgModule({
imports: [SharedModule, CommonModule, SearchResearchResultsServiceModule, PagingModule, SearchCrossrefServiceModule,
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule],
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, SearchInputModule],
providers:[
SearchOrcidService
],

View File

@ -60,6 +60,7 @@ export class LinkingGenericComponent {
this.breadcrumbs.push({name: "Link", route: null});
}
this.showOptions.show = 'source';
this.showOptions.initSelectOptions();
if(this.inlineEntity){
this.showOptions.showLinkTo();
// this.showOptions.basketShowLinksTo = true;