55946: Refactoring of object-select and collection-select component

This commit is contained in:
Kristof De Langhe
2018-10-10 13:30:29 +02:00
parent c4203f25d5
commit 0b3b5d3965
12 changed files with 323 additions and 86 deletions

View File

@@ -0,0 +1,27 @@
<ng-container *ngVar="(dsoRD$ | async) as collectionsRD">
<ds-pagination
*ngIf="collectionsRD?.payload?.totalElements > 0"
[paginationOptions]="paginationOptions"
[pageInfoState]="collectionsRD?.payload"
[collectionSize]="collectionsRD?.payload?.totalElements"
[hidePagerWhenSinglePage]="true"
[hideGear]="true">
<div class="table-responsive">
<table id="collection-select" class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th scope="col">{{'collection.select.table.title' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let collection of collectionsRD?.payload?.page">
<td><input class="collection-checkbox" [ngModel]="getSelected(collection.id) | async" (change)="switch(collection.id)" type="checkbox" name="{{collection.id}}"></td>
<td><a [routerLink]="['/collection', collection.id]">{{collection.name}}</a></td>
</tr>
</tbody>
</table>
</div>
</ds-pagination>
<button class="btn btn-outline-secondary collection-confirm" (click)="confirmSelected()">{{confirmButton | translate}}</button>
</ng-container>