[Trunk | Library]:

1. newSearchPage.component.html: [Bug fix] Remove <search-download> which was duplicate in small screens - Download visible above paging always.
2. rangeFilter.component.html: Range buttons changed to links - library.css changes needed (refactor code when possible).


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58608 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-05-05 17:12:29 +00:00
parent c4addc2f13
commit dad915f543
2 changed files with 61 additions and 19 deletions

View File

@ -397,11 +397,11 @@
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "searchUtils.baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
</div>
<search-download *ngIf= "( entityType !='community' && entityType != 'funder') && usedBy == 'search'"
class="uk-width-1-1@s uk-hidden@m"
[isDisabled]="disableForms"
[type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">
</search-download>
<!-- <search-download *ngIf= "( entityType !='community' && entityType != 'funder') && usedBy == 'search'"-->
<!-- class="uk-width-1-1@s uk-hidden@m"-->
<!-- [isDisabled]="disableForms"-->
<!-- [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">-->
<!-- </search-download>-->
<div *ngIf="(searchUtils.page <= pagingLimit)" class="uk-margin-large-bottom">
<search-result *ngIf="( entityType !='community' && entityType != 'funder') && usedBy == 'search'"

View File

@ -39,21 +39,63 @@
</div>
<div>
<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 class="range-button uk-button-group uk-margin-small-top">-->
<!-- &lt;!&ndash; padding: 0 25px;&ndash;&gt;-->
<!-- <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>
</div>
<!-- <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>-->
</div>
</form>
</div>