From 658c96bb02308e0dec08178ce269fb4b14475bb8 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Fri, 3 Jun 2022 18:34:23 +0300 Subject: [PATCH 1/3] [Connect & Library | new-theme]: Replaced "Subscribed" badge with "Member" text | Renamed "subscriber" filter to "member" in search communities page | Fixed "view all" buttons in my communities page. 1. browse-community.component.html: Replaced "Subscribed" badge with "Member" text | Updated how restricted/private icons are displayed. 2. browse-community.component.ts: Updated visibilityIcon map (PRIVATE -> incognito icon, RESTRICTED -> restricted icon). 3. browse-community.module.ts: iconsService.registerIcons([incognito, restricted]). 4. communities.component.html & my-communities.component.html: Added uk-button class in "View all" button for communities. 5. portal-search-result.component.html: Replaced "Subscribed" badge with "Member" text. 6. searchCommunities.component.ts: Renamed "subscriber" filter to "member". --- searchPages/searchUtils/portal-search-result.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searchPages/searchUtils/portal-search-result.component.html b/searchPages/searchUtils/portal-search-result.component.html index 60d109ad..07edc9fb 100644 --- a/searchPages/searchUtils/portal-search-result.component.html +++ b/searchPages/searchUtils/portal-search-result.component.html @@ -6,8 +6,8 @@ [class.uk-disabled]="!hasPermission(result)">
- Subscribed + class="uk-text-background uk-text-center uk-position-top-left uk-padding-small uk-text-uppercase uk-text-bold"> + Member
From 99e3aad2a031c5b95f46566095f39209369760e6 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 6 Jun 2022 11:55:11 +0300 Subject: [PATCH 2/3] Fix an issue with results per page causing page to crash --- searchPages/searchUtils/newSearchPage.component.html | 8 ++++---- searchPages/searchUtils/newSearchPage.component.ts | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index f64a4f44..d0a3ea5d 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -276,17 +276,17 @@
-
10 || sort || searchUtils.totalResults > searchUtils.size || (!loadPaging && oldTotalResults > searchUtils.size && searchUtils.status == errorCodes.LOADING)" class="uk-grid uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-margin-medium-top" uk-grid>
-
+
- diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index 2b195b5f..6aac0ad0 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -1701,8 +1701,4 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { } return totalPages; } - - get availablePageOptions() { - return this.pageOptions.filter(option => option < this.searchUtils.totalResults); - } } From f9f9a6d5eadbf0efb1cdb9afb74f65d074c92e83 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 6 Jun 2022 12:22:01 +0300 Subject: [PATCH 3/3] Input: enable tooltip in select type. Search Sorting: Change options for stakeholders --- .../advancedSearchForm.component.html | 2 +- .../searchUtils/searchSorting.component.ts | 84 +++++++++++-------- sharedComponents/input/input.component.ts | 5 +- 3 files changed, 51 insertions(+), 40 deletions(-) diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 8ef7c5a1..1a2e27ef 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -25,7 +25,7 @@
-
includes
diff --git a/searchPages/searchUtils/searchSorting.component.ts b/searchPages/searchUtils/searchSorting.component.ts index 042ec10f..f70ac1cf 100644 --- a/searchPages/searchUtils/searchSorting.component.ts +++ b/searchPages/searchUtils/searchSorting.component.ts @@ -1,45 +1,55 @@ import {Component, Input, Output, EventEmitter} from '@angular/core'; +import {Option} from "../../sharedComponents/input/input.component"; @Component({ - selector: 'search-sorting', - template: ` -
-
- -
-
- ` + selector: 'search-sorting', + template: ` +
+
+
+ ` }) export class SearchSortingComponent { - @Input() isDisabled: boolean = false; - @Input() sortBy: string = ''; - @Input() entityType: string = ''; - @Output() sortByChange = new EventEmitter(); - public optionsA = [ - {value: '', label: 'Relevance'}, - {value: 'resultdateofacceptance,descending', label: 'Date (most recent)'}, - {value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'}, - ]; - public optionsB = [ - {value: '', label: 'Title'}, - {value: 'creationdate,descending', label: 'Creation Date (most recent)'}, - {value: 'creationdate,ascending', label: 'Creation Date (least recent)'}, - ]; - - - constructor () {} - - ngOnInit() {} - - - sortByChanged() { - this.sortByChange.emit(this.sortBy); + @Input() isDisabled: boolean = false; + @Input() sortBy: string = ''; + @Input() entityType: string = ''; + @Output() sortByChange = new EventEmitter(); + public options: Option[]; + private generalOptions = [ + {value: '', label: 'Relevance'}, + {value: 'resultdateofacceptance,descending', label: 'Date (most recent)'}, + {value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'}, + ]; + private communityOptions = [ + {value: '', label: 'Title'}, + {value: 'creationdate,descending', label: 'Creation Date (most recent)'}, + {value: 'creationdate,ascending', label: 'Creation Date (least recent)'}, + ]; + private stakeholderOptions = [ + {value: '', label: 'Name'}, + {value: 'creationdate,descending', label: 'Creation Date (most recent)'}, + {value: 'creationdate,ascending', label: 'Creation Date (least recent)'}, + ]; + + constructor() { + } + + ngOnInit() { + if (this.entityType === 'community') { + this.options = this.communityOptions; + } else if (this.entityType === 'stakeholder') { + this.options = this.stakeholderOptions; + } else { + this.options = this.generalOptions; } + } + + + sortByChanged() { + this.sortByChange.emit(this.sortBy); + } } diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index b2eec667..27646fdc 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -57,7 +57,7 @@ declare var UIkit;
+ [attr.uk-tooltip]="(tooltip && !focused && type !== 'chips' && type !== 'textarea')?('title: ' + getLabel(formControl.value) + '; delay: 500; pos: bottom-left'):null"> @@ -194,13 +194,13 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang @Input() value: any | any[]; @Output() valueChange = new EventEmitter(); @Input() hint: string; + @Input() tooltip: boolean = false; /** Text */ @ViewChild('input') input: ElementRef; /** Textarea options */ @ViewChild('textArea') textArea: ElementRef; @Input('rows') rows: number = 3; /** Select | Autocomplete | chips available options */ - @Input() tooltip: boolean = false; @Input() selectArrow: string = 'arrow_drop_down'; @Input() selectedIndex: number = 0; @Input() selectable: boolean = false; @@ -263,6 +263,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.icon = this.selectArrow; } this.selectable = true; + this.tooltip = true; } }