diff --git a/claims/claim-utils/claimContextSearchForm.component.ts b/claims/claim-utils/claimContextSearchForm.component.ts
index 9584455c..620879e8 100644
--- a/claims/claim-utils/claimContextSearchForm.component.ts
+++ b/claims/claim-utils/claimContextSearchForm.component.ts
@@ -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() {
diff --git a/claims/claim-utils/claimContextSearchForm.module.ts b/claims/claim-utils/claimContextSearchForm.module.ts
index 8d9c390a..2b32cd17 100644
--- a/claims/claim-utils/claimContextSearchForm.module.ts
+++ b/claims/claim-utils/claimContextSearchForm.module.ts
@@ -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: [
diff --git a/claims/claim-utils/claimHelper.class.ts b/claims/claim-utils/claimHelper.class.ts
index bc72ecee..8ee3fe6a 100644
--- a/claims/claim-utils/claimHelper.class.ts
+++ b/claims/claim-utils/claimHelper.class.ts
@@ -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;
+ }
}
diff --git a/claims/claim-utils/claimProjectSearchForm.component.html b/claims/claim-utils/claimProjectSearchForm.component.html
index d3fdcaa5..8cce8ca6 100644
--- a/claims/claim-utils/claimProjectSearchForm.component.html
+++ b/claims/claim-utils/claimProjectSearchForm.component.html
@@ -1,23 +1,13 @@
-
+
+
+
+
+
+
No project results yet... Start
- searching for projects to add them in the Basket
+ searching for {{openaireEntities.PROJECTS.toLowerCase()}} to add them in the Basket