From 5b62ed771508e3187c777786db04d22f778a91fb Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 26 Oct 2016 11:38:06 +0000 Subject: [PATCH] updating searchPages with refine results | tabs filled with extra query use special methods (getResultsForEntity(...) in components, search*ForEntity(...) in services) git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44338 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../claim-utils/claimDataset.component.ts | 2 +- .../claim-utils/claimPublication.component.ts | 2 +- .../app/deposit/depositResult.component.ts | 10 +-- .../dataProvider/tabs.component.ts | 4 +- .../organization/organization.component.html | 2 +- .../organization/organization.component.ts | 29 +++++-- .../landingPages/person/person.component.ts | 6 +- .../landingPages/project/project.component.ts | 6 +- .../advancedSearchPublications.component.ts | 2 +- .../compatibleDataProviders.component.ts | 8 +- .../app/searchPages/find/search.component.ts | 10 +-- .../searchDataproviders.component.ts | 75 ++++++++++++++++- .../searchPages/searchDatasets.component.ts | 84 ++++++++++++++++++- .../searchOrganizations.component.ts | 80 +++++++++++++++++- .../app/searchPages/searchPeople.component.ts | 41 ++++++++- .../searchPublications.component.ts | 81 +++++++++++++++++- .../searchUtils/searchPage.component.ts | 6 +- portal-2/src/app/services/project.service.ts | 13 ++- .../src/app/services/publication.service.ts | 4 +- .../services/searchDataproviders.service.ts | 40 ++++----- .../app/services/searchDatasets.service.ts | 41 +++++---- .../services/searchOrganizations.service.ts | 29 ++++--- .../src/app/services/searchPeople.service.ts | 23 ++--- .../services/searchPublications.service.ts | 41 +++++---- 24 files changed, 497 insertions(+), 142 deletions(-) diff --git a/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts b/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts index a2d37272..59d9277f 100644 --- a/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts +++ b/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts @@ -122,7 +122,7 @@ export class ClaimDatasetComponent { } private searchOpenaire (term: string, size : number, page : number) { - this._searchDatasetsService.searchDatasets(term, page, size, "claim", []).subscribe( + this._searchDatasetsService.searchDatasets(term, null, page, size, []).subscribe( data => { if(data != null) { this.openairePage=page; diff --git a/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts b/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts index 9bb042d5..0e36e1d4 100644 --- a/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts +++ b/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts @@ -162,7 +162,7 @@ private getCrossrefResults (term: string, size : number, page : number) { } private searchOpenaire(term: string, size : number, page : number) { this.openaireStatus = this.errorCodes.LOADING; - this._searchPublicationsService.searchPublications(term, page, size, "claim").subscribe( + this._searchPublicationsService.searchPublications(term, null, page, size, []).subscribe( data => { if(data != null) { this.openairePage=page; diff --git a/portal-2/src/app/deposit/depositResult.component.ts b/portal-2/src/app/deposit/depositResult.component.ts index 99e98caf..d148a8f4 100644 --- a/portal-2/src/app/deposit/depositResult.component.ts +++ b/portal-2/src/app/deposit/depositResult.component.ts @@ -100,11 +100,11 @@ export class DepositResultComponent { } private searchDataproviders() { - if(this.organization != undefined) { - this.searchDataprovidersComponent.getResults(this.organization.name, 1, 10, "searchPage"); - } else if(this.organizationId != undefined) { - this.searchDataprovidersComponent.getResults(this.organizationId, 1, 10, "organizationPage"); - } + // if(this.organization != undefined) { + // this.searchDataprovidersComponent.getResults(this.organization.name, false, 1, 10); + // } else if(this.organizationId != undefined) { + this.searchDataprovidersComponent.getResultsForEntity("organization", this.organizationId, 1, 10); + //} this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders(); } diff --git a/portal-2/src/app/landingPages/dataProvider/tabs.component.ts b/portal-2/src/app/landingPages/dataProvider/tabs.component.ts index f5786bdc..1f227683 100644 --- a/portal-2/src/app/landingPages/dataProvider/tabs.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/tabs.component.ts @@ -108,10 +108,10 @@ export class TabsComponent { } private searchPublications() { - this.searchPublicationsComponent.getResults(this.id, 1, 10, "dataproviderPage"); + this.searchPublicationsComponent.getResultsForEntity("dataprovider", this.id, 1, 10); } private searchDatasets() { - this.searchDatasetsComponent.getResults(this.id, 1, 10, "dataproviderPage"); + this.searchDatasetsComponent.getResultsForEntity("dataprovider", this.id, 1, 10); } } diff --git a/portal-2/src/app/landingPages/organization/organization.component.html b/portal-2/src/app/landingPages/organization/organization.component.html index 69450e00..1ff64376 100644 --- a/portal-2/src/app/landingPages/organization/organization.component.html +++ b/portal-2/src/app/landingPages/organization/organization.component.html @@ -33,7 +33,7 @@ {{projectsNum}} -
  • +
  • Data Providers