From 72905d8599e18fe0e5dce9965103e60d20761166 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 5 Jul 2022 01:31:56 +0300 Subject: [PATCH] [Connect Admin | Library | new-theme]: Redesign of remove/add projects and zenodo communities pages according to the new mocks. 1. searchProjects.service.ts: Added "params" parameter in "getFunders()" method. 2. resultsAndPagesNum.component.ts: Do not show number of results and pages when no results. 3. manage-communities.module.ts: Remove "group" and "lock" icons from registerIcons call. 4. add-projects.component & communityProjects.module.ts & manage-projects.component.ts & remove-projects.component: Redesign of remove/add projects pages according to the new mocks. 5. add-zenodo-communities.component & manage-zenodo-communities.component & preview-z-community.component.ts & zenodo-communities.component.ts & zenodo-communities.module.ts: Redesign of remove/add zenodo communities pages according to the new mocks. --- dashboard/portal/portals.component.ts | 2 +- services/searchProjects.service.ts | 6 +++--- utils/resultsAndPagesNum.component.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dashboard/portal/portals.component.ts b/dashboard/portal/portals.component.ts index 784c8516..674056bc 100644 --- a/dashboard/portal/portals.component.ts +++ b/dashboard/portal/portals.component.ts @@ -135,7 +135,7 @@ export class PortalsComponent implements OnInit { private confirmModalOpen() { this.deleteModal.alertTitle = 'Delete Confirmation'; - this.deleteModal.message = 'Are you sure you want to delete the selected portal(-ies)?'; + this.deleteModal.message = 'Are you sure you want to delete the selected portal(s)?'; this.deleteModal.okButtonText = 'Yes'; this.deleteModal.open(); } diff --git a/services/searchProjects.service.ts b/services/searchProjects.service.ts index 19113242..41b10fbd 100644 --- a/services/searchProjects.service.ts +++ b/services/searchProjects.service.ts @@ -95,12 +95,12 @@ export class SearchProjectsService { //.map(res => res.json()) .pipe(map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "project")])); } - getFunders(properties:EnvProperties ):any { - let url = properties.searchAPIURLLAst+"projects?refine=true&fields=funder&size=0"+ "&format=json"; + getFunders(params: string, properties:EnvProperties ):any { + let url = properties.searchAPIURLLAst+"projects?refine=true&fields=funder"+(params ? "&"+params : "")+"&size=0"+ "&format=json"; return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) //.map(res => res.json()) - .pipe(map(res => [res['meta'].total, res['refineResults']['funder']])); + .pipe(map(res => [res['meta'].total, RefineResultsUtils.parse(res['refineResults'], ['funder'], 'project')])); } diff --git a/utils/resultsAndPagesNum.component.ts b/utils/resultsAndPagesNum.component.ts index 67b2a1d9..e4de31f1 100644 --- a/utils/resultsAndPagesNum.component.ts +++ b/utils/resultsAndPagesNum.component.ts @@ -3,7 +3,7 @@ import {Component, Input} from "@angular/core"; @Component({ selector: 'results-and-pages', template: ` -
+
{{totalResults | number}} {{type}}, page {{currentPage}}