From 390ab2b072dbb56b65b1d7f709d87a1451e70712 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 5 Aug 2019 10:30:19 +0000 Subject: [PATCH] Library: Add showType parameter on search components for communities. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56845 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../searchUtils/communitySearchResults.component.html | 2 +- .../searchUtils/communitySearchResults.component.ts | 1 + searchPages/searchUtils/searchPage.component.html | 7 +++++++ searchPages/searchUtils/searchPage.component.ts | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/searchPages/searchUtils/communitySearchResults.component.html b/searchPages/searchUtils/communitySearchResults.component.html index b7d479de..336a6d8b 100644 --- a/searchPages/searchUtils/communitySearchResults.component.html +++ b/searchPages/searchUtils/communitySearchResults.component.html @@ -79,7 +79,7 @@ Creation Date: {{result.date | date:'dd-MM-yyyy'}} -
+
Type: {{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}} diff --git a/searchPages/searchUtils/communitySearchResults.component.ts b/searchPages/searchUtils/communitySearchResults.component.ts index 99a638be..f74fd780 100644 --- a/searchPages/searchUtils/communitySearchResults.component.ts +++ b/searchPages/searchUtils/communitySearchResults.component.ts @@ -15,6 +15,7 @@ export class CommunitySearchResultsComponent { @Input() results: CommunityInfo[]; @Input() status: number; @Input() type: string; + @Input() showType = false; @Input() showLoading: boolean = false; @Input() custom_class: string = "search-results"; @Input() properties: EnvProperties; diff --git a/searchPages/searchUtils/searchPage.component.html b/searchPages/searchUtils/searchPage.component.html index 700ddfb9..f8d05a98 100644 --- a/searchPages/searchUtils/searchPage.component.html +++ b/searchPages/searchUtils/searchPage.component.html @@ -105,6 +105,9 @@
+
+ No filters available +
Filter By:
@@ -165,6 +168,9 @@ Try new Query +
+ No filters available +
@@ -200,6 +206,7 @@ [results]="results" [status]="searchUtils.status" [type]="entityType" + [showType]="showType" [showLoading]="true" [properties]=properties> diff --git a/searchPages/searchUtils/searchPage.component.ts b/searchPages/searchUtils/searchPage.component.ts index 56161421..b9c704f3 100644 --- a/searchPages/searchUtils/searchPage.component.ts +++ b/searchPages/searchUtils/searchPage.component.ts @@ -60,6 +60,7 @@ export class SearchPageComponent { @Input() newQueryButton: boolean = true; @Input() lastIndex: boolean = true; @Input() hasPrefix: boolean = true; + @Input() showType = false; //@Input() sortBy: string = ""; @ViewChild (ModalLoading) loading : ModalLoading ; public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }}; @@ -95,7 +96,7 @@ export class SearchPageComponent { } ngOnInit() { - +console.log(this.filters) this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific;