From c6922230c3386df87e9d2896b606be6294ebee53 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Wed, 19 Dec 2018 14:07:02 +0000 Subject: [PATCH] Advanced Search limit query for organizations & datasources similar to simple search & landing Organization Autocomplete: show legalname (legal short name) Css: change dashboard buttons focus & active git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54461 d315682c-612b-4755-9ff5-7f18f6832af3 --- services/searchDataproviders.service.ts | 3 ++- services/searchOrganizations.service.ts | 6 +++++- utils/entitiesAutoComplete/entitySearch.service.ts | 8 ++++++++ utils/properties/environment-specific.service.ts | 3 +++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/services/searchDataproviders.service.ts b/services/searchDataproviders.service.ts index 76aeea04..e6274dc0 100644 --- a/services/searchDataproviders.service.ts +++ b/services/searchDataproviders.service.ts @@ -35,7 +35,8 @@ export class SearchDataprovidersService { //((oaftype exact datasource) and(collectedfromdatasourceid exact "openaire____::47ce9e9f4fad46e732cff06419ecaabb")) advancedSearchDataproviders (params: string, page: number, size: number, properties: EnvProperties ):any { let url = properties.searchResourcesAPIURL; - var basicQuery = "(oaftype exact datasource) " + var basicQuery = "(oaftype exact datasource) " + + 'and (datasourcecompatibilityid <> "UNKNOWN")'; url += "?query="; if(params!= null && params != '' ) { url +=" ( "+basicQuery+ " ) " +" and (" + params + ")"; diff --git a/services/searchOrganizations.service.ts b/services/searchOrganizations.service.ts index 2b0bdb75..1dc0f3f5 100644 --- a/services/searchOrganizations.service.ts +++ b/services/searchOrganizations.service.ts @@ -60,7 +60,11 @@ export class SearchOrganizationsService { } advancedSearchOrganizations (params: string, page: number, size: number, properties:EnvProperties ):any { let url = properties.searchResourcesAPIURL; - var basicQuery = "(oaftype exact organization) " + var basicQuery = "oaftype exact organization and " + +"(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or " + + "reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or " + + "reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)"; + url += "?query="; if(params!= null && params != '' ) { url +=" ( "+basicQuery+ " ) " +" and (" + params + ")"; diff --git a/utils/entitiesAutoComplete/entitySearch.service.ts b/utils/entitiesAutoComplete/entitySearch.service.ts index cd25032c..be500a90 100644 --- a/utils/entitiesAutoComplete/entitySearch.service.ts +++ b/utils/entitiesAutoComplete/entitySearch.service.ts @@ -178,6 +178,14 @@ private fetch (link,id,oafEntityType,type, properties:EnvProperties ){ } else { value.label = resData["legalname"]; } + if(resData["legalshortname"]){ + + if(Array.isArray(resData["legalshortname"])) { + value.label += " (" + resData["legalshortname"][0] +")"; + } else { + value.label += " (" + resData["legalshortname"] +")"; + } + } }else if(resData["officialname"]){ diff --git a/utils/properties/environment-specific.service.ts b/utils/properties/environment-specific.service.ts index b3a9f32e..a321e4f1 100644 --- a/utils/properties/environment-specific.service.ts +++ b/utils/properties/environment-specific.service.ts @@ -22,6 +22,9 @@ export class EnvironmentSpecificService { // private serverUrl = "https://beta.explore.openaire.eu"; // private serverUrl = "https://beta.connect.openaire.eu"; // private serverUrl = "https://beta.admin.connect.openaire.eu"; + // private serverUrl = "https://explore.openaire.eu"; + // private serverUrl = "https://connect.openaire.eu"; + // private serverUrl = "https://test.explore.openaire.eu"; constructor(private http: Http, @Inject(PLATFORM_ID) private platformId: string) { this.testBrowser = isPlatformBrowser(platformId); if (this.testBrowser) {