2020-02-17 15:19:14 +01:00
|
|
|
<div *ngIf= "filter.values.length >0" class="uk-margin-small-bottom">
|
|
|
|
<div class="uk-margin-small-top uk-margin-bottom uk-grid uk-flex uk-flex-bottom">
|
2020-10-13 21:04:50 +02:00
|
|
|
<h6 class="uk-margin-bottom-remove" title = "{{filter.title}}">{{_formatTitle(filter.title,filter.values.length)}}</h6>
|
2020-07-14 15:13:44 +02:00
|
|
|
<a *ngIf="filter.countSelectedValues>0" (click)="clearFilter()"
|
|
|
|
[class]="((isDisabled)?'uk-disabled':'') + ' portal-link '">
|
2020-02-17 15:19:14 +01:00
|
|
|
Clear
|
|
|
|
</a>
|
|
|
|
</div>
|
2017-12-19 13:53:46 +01:00
|
|
|
<div aria-expanded="false">
|
2020-02-17 15:19:14 +01:00
|
|
|
<div>
|
2020-02-24 17:27:01 +01:00
|
|
|
<ng-container>
|
2020-04-28 12:07:53 +02:00
|
|
|
<div *ngFor="let value of getSelectedAndTopValues(filter, filterValuesNum)"
|
2020-02-24 17:27:01 +01:00
|
|
|
class="uk-animation-fade filterItem searchFilterItem uk-text-small">
|
|
|
|
<div title = "{{value.name}}">
|
2020-07-24 13:21:22 +02:00
|
|
|
<ng-container *ngTemplateOutlet="input_label; context: {filter: filter, value: value}"></ng-container>
|
2020-02-24 17:27:01 +01:00
|
|
|
</div>
|
2020-02-17 15:19:14 +01:00
|
|
|
</div>
|
|
|
|
</ng-container>
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2020-02-17 15:19:14 +01:00
|
|
|
<div *ngIf=" addShowMore && (filter.values.length) > filterValuesNum">
|
2020-02-24 17:27:01 +01:00
|
|
|
<a
|
2020-02-17 15:19:14 +01:00
|
|
|
[class]="((isDisabled)?'uk-disabled uk-link-muted ':' portal-link ') + ' uk-margin-small-top'"
|
|
|
|
[attr.uk-toggle]="'target: #toggle-'+filter.filterId" (click)="toggle()">
|
2020-04-27 10:14:05 +02:00
|
|
|
<span *ngIf="!isOpen">+ View all</span>
|
|
|
|
<!-- <span *ngIf="isOpen">- View less</span>-->
|
2019-07-15 18:11:07 +02:00
|
|
|
</a>
|
2020-02-17 15:19:14 +01:00
|
|
|
|
|
|
|
<div hidden [id]="'toggle-'+filter.filterId" class="uk-text-small uk-margin-small-bottom">
|
2019-07-15 18:11:07 +02:00
|
|
|
<div class="">
|
2020-04-27 10:14:05 +02:00
|
|
|
<span class="uk-text-meta uk-margin-small-left">Top 100 values are
|
|
|
|
shown in the filters</span>
|
|
|
|
<div class="uk-grid uk-margin-small-left uk-flex uk-flex-bottom">
|
|
|
|
<input class="uk-input uk-margin-small-top uk-form-small uk-width-2-3@m uk-width-3-5@s text-input-box "
|
|
|
|
name="filter-keyword"
|
|
|
|
placeholder="Search..." type="text" [(ngModel)]="keyword">
|
2020-02-17 15:19:14 +01:00
|
|
|
|
2020-04-27 10:14:05 +02:00
|
|
|
<span *ngIf = "showResultCount === true"
|
|
|
|
class="uk-width-1-3@m uk-width-2-5@s uk-padding-small uk-padding-remove-vertical uk-padding-remove-right">
|
2020-02-24 17:27:01 +01:00
|
|
|
<span class="uk-width-1-4 uk-text-muted"> Sort by:</span>
|
2020-03-13 17:11:36 +01:00
|
|
|
<select [(ngModel)]="sortBy"
|
2020-04-27 10:14:05 +02:00
|
|
|
class=" uk-width-expand uk-select uk-hidden@m uk-form-small"
|
2020-03-13 17:11:36 +01:00
|
|
|
id="form-horizontal-select" name="select_order">
|
|
|
|
<option value="num">Results number</option>
|
|
|
|
<option value="name">Name</option>
|
|
|
|
</select>
|
2020-03-12 11:48:04 +01:00
|
|
|
<mat-select [(ngModel)]="sortBy"
|
2020-03-16 15:42:11 +01:00
|
|
|
class="uk-width-expand matSelection uk-visible@m"
|
2020-03-13 17:11:36 +01:00
|
|
|
id="form-horizontal-select1" name="select_order"
|
|
|
|
[disableOptionCentering]="true" panelClass="matSelectionPanel">
|
2020-03-12 11:48:04 +01:00
|
|
|
<mat-option value="num">Results number</mat-option>
|
|
|
|
<mat-option value="name">Name</mat-option>
|
|
|
|
</mat-select>
|
2020-02-17 15:19:14 +01:00
|
|
|
</span>
|
2019-07-15 18:11:07 +02:00
|
|
|
</div>
|
2020-04-27 10:14:05 +02:00
|
|
|
</div>
|
2019-07-15 18:11:07 +02:00
|
|
|
|
2020-07-14 15:13:44 +02:00
|
|
|
<div class="uk-overflow-auto uk-height-max-small uk-padding-remove
|
2020-02-24 17:27:01 +01:00
|
|
|
uk-margin-small-left uk-margin-small-right uk-margin-small-top uk-width-1-1">
|
2020-03-24 16:40:51 +01:00
|
|
|
<ng-container *ngFor="let value of sort(filter.values)">
|
|
|
|
<div *ngIf="filterKeywords(value.name)" title = "{{value.name}}"
|
|
|
|
class="uk-animation-fade filterItem searchFilterItem uk-text-small">
|
2020-07-24 13:21:22 +02:00
|
|
|
<ng-container *ngTemplateOutlet="input_label; context: {filter: filter, value: value}"></ng-container>
|
2019-07-15 18:11:07 +02:00
|
|
|
</div>
|
|
|
|
</ng-container>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-27 10:14:05 +02:00
|
|
|
<a [class]="(isDisabled)?'uk-disabled uk-link-muted ':' portal-link '"
|
|
|
|
[attr.uk-toggle]="'target: #toggle-'+filter.filterId" (click)="toggle()">
|
|
|
|
<span *ngIf="isOpen">- View less</span>
|
|
|
|
</a>
|
2019-07-15 18:11:07 +02:00
|
|
|
</div>
|
2017-12-19 13:53:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-17 15:19:14 +01:00
|
|
|
</div>
|
2020-07-24 13:21:22 +02:00
|
|
|
|
|
|
|
<ng-template #input_label let-filter="filter" let-value="value">
|
|
|
|
<label *ngIf="filter.filterType == 'checkbox' || filter.filterType == 'radio'"
|
|
|
|
[class]="(isDisabled || (showResultCount && value.number === 0)) ? 'uk-disabled' : ''">
|
|
|
|
<input *ngIf="filter.filterType == 'checkbox'" type="checkbox" class="uk-checkbox"
|
|
|
|
[disabled]="isDisabled || (showResultCount && value.number === 0)"
|
|
|
|
[(ngModel)]="value.selected" (ngModelChange)="filterChange(value.selected)" />
|
|
|
|
<input *ngIf="filter.filterType == 'radio'" type="radio" class="uk-radio"
|
|
|
|
[disabled]="isDisabled || (showResultCount && value.number === 0)"
|
|
|
|
[name]="filter.filterId" [value]="value.id" [(ngModel)]="filter.radioValue"
|
|
|
|
(ngModelChange)="uniqueFilterChange(value)"/>
|
|
|
|
{{' '+_formatName(value)}}
|
|
|
|
<span *ngIf = "showResultCount === true" >
|
|
|
|
{{' ('+(value.number|number)+')'}}
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</ng-template>
|