2020-02-17 15:19:14 +01:00
|
|
|
<div class="uk-margin-small-bottom">
|
|
|
|
<div class="uk-margin-small-top uk-margin-bottom uk-grid uk-flex uk-flex-bottom">
|
|
|
|
<h5 class="uk-margin-bottom-remove">{{_formatTitle(filter.title)}}</h5>
|
|
|
|
<a *ngIf="filter.selectedFromValue || filter.selectedToValue" (click)="clearFilter()" class="portal-link">
|
|
|
|
Clear
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div aria-expanded="false">
|
|
|
|
<div>
|
|
|
|
<div class = "uk-animation-fade filterItem searchFilterItem uk-text-small">
|
|
|
|
<div class="searchFilterBoxValues ">
|
2020-02-24 14:38:08 +01:00
|
|
|
<form class="uk-inline uk-text-small form-group uk-margin-remove-bottom" #rangeForm="ngForm" fromYearAfterToYear>
|
2020-02-17 15:19:14 +01:00
|
|
|
<input class=" uk-input form-control uk-width-1-3" (focus)="focusedInput = 'from'" (blur)="focusedInput = ''"
|
|
|
|
[(ngModel)]="filter.selectedFromValue" name="yearFrom" #yearFrom="ngModel" inValidYear
|
2020-03-28 01:33:55 +01:00
|
|
|
placeholder="e.g. 1931" [disabled]="isDisabled"/>
|
2020-02-17 15:19:14 +01:00
|
|
|
<input class=" uk-input form-control uk-width-1-3 uk-margin-left" (focus)="focusedInput = 'to'" (blur)="focusedInput = ''"
|
|
|
|
[(ngModel)]="filter.selectedToValue" name="yearTo" #yearTo="ngModel" inValidYear
|
2020-03-28 01:33:55 +01:00
|
|
|
placeholder="e.g. 2020" [disabled]="isDisabled"/>
|
2020-02-17 15:19:14 +01:00
|
|
|
<button type="submit" (click)="yearChanged()"
|
2020-03-24 16:40:51 +01:00
|
|
|
[ngStyle]="{'cursor': (rangeForm.valid && (yearFrom.dirty || yearTo.dirty)) ? 'pointer' : 'default'}"
|
2020-02-25 16:40:56 +01:00
|
|
|
class="uk-icon uk-icon-button uk-margin-small-left uk-text-right uk-button-default"
|
2020-03-28 01:33:55 +01:00
|
|
|
[disabled]="isDisabled || rangeForm.invalid || (!yearFrom.dirty && !yearTo.dirty)">
|
2020-02-17 15:19:14 +01:00
|
|
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
icon="chevron-right" ratio="1">
|
|
|
|
<polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline>
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
|
2020-02-26 16:01:16 +01:00
|
|
|
<div *ngIf="(yearFrom.invalid && focusedInput != 'from' && (yearFrom.dirty || yearFrom.touched)) ||
|
|
|
|
(yearTo.invalid && focusedInput != 'to' && (yearTo.dirty || yearTo.touched))"
|
|
|
|
class="alert alert-danger uk-margin-small-top uk-margin-remove-bottom">
|
|
|
|
<div *ngIf="(yearFrom.errors && yearFrom.errors.inValidYear) || (yearTo.errors && yearTo.errors.inValidYear)">
|
|
|
|
Year must be between {{yearMin}} and {{yearMax}}.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="yearFrom.valid && yearTo.valid && rangeForm.errors?.fromYearAfterToYear && (rangeForm.touched || rangeForm.dirty)"
|
|
|
|
class="alert alert-danger uk-margin-small-top uk-margin-remove-bottom">
|
|
|
|
Starting year must be greater than or equal to ending year.
|
|
|
|
</div>
|
|
|
|
|
2020-02-24 14:38:08 +01:00
|
|
|
<div>
|
2020-05-05 19:12:29 +02:00
|
|
|
<!-- <div class="range-button uk-button-group uk-margin-small-top">-->
|
|
|
|
<!-- <!– padding: 0 25px;–>-->
|
|
|
|
<!-- <button [class]="'uk-button uk-button-default uk-button-small uk-text-small'-->
|
|
|
|
<!-- + ((stringToNum(filter.selectedFromValue) == currentYear && stringToNum(filter.selectedToValue) == currentYear) ? ' uk-text-bold' : '')"-->
|
|
|
|
<!-- (click)="yearChanged(0)" [disabled]="isDisabled">This year-->
|
|
|
|
<!-- </button>-->
|
|
|
|
<!-- <button [class]="'uk-button uk-button-default uk-button-small uk-text-small'-->
|
|
|
|
<!-- + ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-4) ? ' uk-text-bold' : '')"-->
|
|
|
|
<!-- (click)="yearChanged(4)" [disabled]="isDisabled">Last 5 years-->
|
|
|
|
<!-- </button>-->
|
|
|
|
<!-- <button [class]="'uk-button uk-button-default uk-button-small uk-text-small'-->
|
|
|
|
<!-- + ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-9) ? ' uk-text-bold' : '')"-->
|
|
|
|
<!-- (click)="yearChanged(9)" [disabled]="isDisabled">Last 10 years-->
|
|
|
|
<!-- </button>-->
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
<!-- <div class="range-button uk-margin-small-top uk-child-width-1-3">-->
|
|
|
|
<!-- <a [class]="'first-col uk-padding-small uk-padding-remove-vertical uk-text-small uk-text-center portal-link '-->
|
|
|
|
<!-- + ((stringToNum(filter.selectedFromValue) == currentYear && stringToNum(filter.selectedToValue) == currentYear) ? ' uk-text-bold' : '')-->
|
|
|
|
<!-- + (isDisabled ? ' uk-disabled uk-text-muted' : '')"-->
|
|
|
|
<!-- (click)="yearChanged(0)"><span>This year</span>-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<!-- <a [class]="'uk-padding-small uk-padding-remove-vertical uk-text-small uk-text-center portal-link '-->
|
|
|
|
<!-- + ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-4) ? ' uk-text-bold' : '')-->
|
|
|
|
<!-- + (isDisabled ? ' uk-disabled uk-text-muted' : '')"-->
|
|
|
|
<!-- (click)="yearChanged(4)"><span>Last 5 years</span>-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<!-- <a [class]="'uk-padding-small uk-padding-remove-vertical uk-text-small uk-text-center portal-link '-->
|
|
|
|
<!-- + ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-9) ? ' uk-text-bold' : '')-->
|
|
|
|
<!-- + (isDisabled ? ' uk-disabled uk-text-muted' : '')"-->
|
|
|
|
<!-- (click)="yearChanged(9)"><span>Last 10 years</span>-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
<div class="range-button uk-grid uk-grid-small uk-grid-divider uk-margin-top uk-child-width-1-3">
|
|
|
|
<a [class]="'uk-text-small uk-text-center portal-link '
|
|
|
|
+ ((stringToNum(filter.selectedFromValue) == currentYear && stringToNum(filter.selectedToValue) == currentYear) ? ' uk-text-bold' : '')
|
|
|
|
+ (isDisabled ? ' uk-disabled uk-text-muted' : '')"
|
|
|
|
(click)="yearChanged(0)"><span>This year</span>
|
|
|
|
</a>
|
|
|
|
<a [class]="'uk-text-small uk-text-center portal-link '
|
|
|
|
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-4) ? ' uk-text-bold' : '')
|
|
|
|
+ (isDisabled ? ' uk-disabled uk-text-muted' : '')"
|
|
|
|
(click)="yearChanged(4)"><span>Last 5 years</span>
|
|
|
|
</a>
|
|
|
|
<a [class]="'uk-text-small uk-text-center portal-link '
|
|
|
|
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-9) ? ' uk-text-bold' : '')
|
|
|
|
+ (isDisabled ? ' uk-disabled uk-text-muted' : '')"
|
|
|
|
(click)="yearChanged(9)"><span>Last 10 years</span>
|
|
|
|
</a>
|
2020-02-24 14:38:08 +01:00
|
|
|
</div>
|
2020-05-05 19:12:29 +02:00
|
|
|
|
|
|
|
<!-- <ul class="uk-subnav uk-subnav-divider uk-margin-small-top uk-padding-remove">-->
|
|
|
|
<!-- <li class="uk-padding-remove"><a>This year</a></li>-->
|
|
|
|
<!-- <li><a>Last 5 years</a></li>-->
|
|
|
|
<!-- <li><a>Last 10 years</a></li>-->
|
|
|
|
<!-- </ul>-->
|
2020-02-24 14:38:08 +01:00
|
|
|
</div>
|
2020-02-17 15:19:14 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-25 16:40:56 +01:00
|
|
|
</div>
|