Commits
Giuseppe Digilio authored 2ce744280bf
13 13 | <button class="dropdown-item" *ngFor="let item of pageSizeOptions" (click)="doPageSizeChange(item)"><i [ngClass]="{'invisible': item != (pageSize$|async)}" class="fas fa-check" aria-hidden="true"></i> {{item}} </button> |
14 14 | <h6 class="dropdown-header">{{ 'pagination.sort-direction' | translate}}</h6> |
15 15 | <button class="dropdown-item" *ngFor="let direction of (sortDirections | dsKeys)" (click)="doSortDirectionChange(direction.value)"><i [ngClass]="{'invisible': direction.value !== (sortDirection$ |async)}" class="fas fa-check" aria-hidden="true"></i> {{'sorting.' + direction.key | translate}} </button> |
16 16 | </div> |
17 17 | </div> |
18 18 | </div> |
19 19 | </div> |
20 20 | </div> |
21 21 | <ng-content></ng-content> |
22 22 | |
23 - | <div *ngIf="shouldShowBottomPager | async" class="pagination justify-content-center clearfix bottom"> |
24 - | <div *ngIf="showPaginator"> |
23 + | <div *ngIf="shouldShowBottomPager | async"> |
24 + | <div *ngIf="showPaginator" class="pagination justify-content-center clearfix bottom"> |
25 25 | <ngb-pagination [boundaryLinks]="paginationOptions.boundaryLinks" |
26 26 | [collectionSize]="collectionSize" |
27 27 | [disabled]="paginationOptions.disabled" |
28 28 | [ellipses]="paginationOptions.ellipses" |
29 29 | [maxSize]="(isXs)?5:paginationOptions.maxSize" |
30 30 | [page]="(currentPage$|async)" |
31 31 | (pageChange)="doPageChange($event)" |
32 32 | [pageSize]="(pageSize$ |async)" |
33 33 | [rotate]="paginationOptions.rotate" |
34 34 | [size]="(isXs)?'sm':paginationOptions.size"> |
35 35 | </ngb-pagination> |
36 36 | </div> |
37 - | |
38 - | <div *ngIf="!showPaginator"> |
39 - | <ul class="list-unstyled"> |
40 - | <li *ngFor="let object of objects?.payload?.page" class="mt-4 mb-4"> |
41 - | <ds-listable-object-component-loader [object]="object" [viewMode]="viewMode"></ds-listable-object-component-loader> |
42 - | </li> |
43 - | </ul> |
44 - | <div> |
45 - | <button id="nav-prev" type="button" class="btn btn-outline-primary float-left" (click)="goPrev()" [disabled]="objects?.payload?.currentPage <= 1"><i class="fas fa-angle-left"></i> {{'pagination.previous.button' |translate}}</button> |
46 - | <button id="nav-next" type="button" class="btn btn-outline-primary float-right" (click)="goNext()" [disabled]="objects?.payload?.currentPage >= objects?.payload?.totalPages"><i class="fas fa-angle-right"></i> {{'pagination.next.button' |translate}}</button> |
47 - | </div> |
37 + | |
38 + | <div *ngIf="!showPaginator" class="d-flex justify-content-between"> |
39 + | <button id="nav-prev" type="button" class="btn btn-outline-primary float-left" |
40 + | (click)="goPrev()" |
41 + | [disabled]="objects?.payload?.currentPage <= 1"> |
42 + | <i class="fas fa-angle-left"></i> {{'pagination.previous.button' |translate}} |
43 + | </button> |
44 + | <button id="nav-next" type="button" class="btn btn-outline-primary float-right" |
45 + | (click)="goNext()" |
46 + | [disabled]="objects?.payload?.currentPage >= objects?.payload?.totalPages"> |
47 + | <i class="fas fa-angle-right"></i> {{'pagination.next.button' |translate}} |
48 + | </button> |
48 49 | </div> |
49 50 | </div> |
50 51 | </div> |