2018-07-06 18:49:06 +02:00
|
|
|
<div class="page-header d-flex">
|
2018-07-06 16:21:08 +02:00
|
|
|
<h1>{{ "collections" | i18n }}</h1>
|
2018-07-06 18:49:06 +02:00
|
|
|
<div class="ml-auto d-flex">
|
2018-07-06 20:15:10 +02:00
|
|
|
<div>
|
2018-07-06 18:49:06 +02:00
|
|
|
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
|
2019-02-21 22:50:37 +01:00
|
|
|
<input
|
|
|
|
type="search"
|
|
|
|
class="form-control form-control-sm"
|
|
|
|
id="search"
|
|
|
|
placeholder="{{ 'search' | i18n }}"
|
|
|
|
[(ngModel)]="searchText"
|
2018-07-06 18:49:06 +02:00
|
|
|
/>
|
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2021-10-20 23:17:27 +02:00
|
|
|
type="button"
|
|
|
|
*ngIf="this.canCreate"
|
|
|
|
class="btn btn-sm btn-outline-primary ml-3"
|
|
|
|
(click)="add()"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
|
2018-07-06 18:49:06 +02:00
|
|
|
{{ "newCollection" | i18n }}
|
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-07-06 16:21:08 +02:00
|
|
|
</div>
|
2019-10-11 17:22:21 +02:00
|
|
|
<ng-container *ngIf="loading">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i
|
|
|
|
class="bwi bwi-spinner bwi-spin text-muted"
|
|
|
|
title="{{ 'loading' | i18n }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
></i>
|
2019-10-11 17:22:21 +02:00
|
|
|
<span class="sr-only">{{ "loading" | i18n }}</span>
|
|
|
|
</ng-container>
|
2020-05-22 18:26:43 +02:00
|
|
|
<ng-container
|
|
|
|
*ngIf="
|
|
|
|
!loading &&
|
|
|
|
(isPaging()
|
|
|
|
? pagedCollections
|
|
|
|
: (collections | search: searchText:'name':'id')) as searchedCollections
|
2021-12-17 15:57:11 +01:00
|
|
|
"
|
2020-05-22 18:26:43 +02:00
|
|
|
>
|
2018-07-10 16:07:52 +02:00
|
|
|
<p *ngIf="!searchedCollections.length">{{ "noCollectionsInList" | i18n }}</p>
|
2020-05-22 18:26:43 +02:00
|
|
|
<table
|
|
|
|
class="table table-hover table-list"
|
|
|
|
*ngIf="searchedCollections.length"
|
|
|
|
infiniteScroll
|
|
|
|
[infiniteScrollDistance]="1"
|
|
|
|
[infiniteScrollDisabled]="!isPaging()"
|
|
|
|
(scrolled)="loadMore()"
|
|
|
|
>
|
2018-07-06 18:49:06 +02:00
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let c of searchedCollections">
|
2018-07-06 21:45:35 +02:00
|
|
|
<td>
|
2018-07-06 18:49:06 +02:00
|
|
|
<a href="#" appStopClick (click)="edit(c)">{{ c.name }}</a>
|
|
|
|
</td>
|
|
|
|
<td class="table-list-options">
|
2021-10-20 23:17:27 +02:00
|
|
|
<div class="dropdown" appListDropdown *ngIf="this.canEdit(c) || this.canDelete(c)">
|
2019-02-21 22:50:37 +01:00
|
|
|
<button
|
|
|
|
class="btn btn-outline-secondary dropdown-toggle"
|
|
|
|
type="button"
|
|
|
|
data-toggle="dropdown"
|
2019-10-11 17:22:21 +02:00
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false"
|
|
|
|
appA11yTitle="{{ 'options' | i18n }}"
|
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-cog bwi-lg" aria-hidden="true"></i>
|
2018-07-06 18:49:06 +02:00
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu dropdown-menu-right">
|
2021-10-20 23:17:27 +02:00
|
|
|
<a
|
|
|
|
class="dropdown-item"
|
|
|
|
href="#"
|
|
|
|
appStopClick
|
|
|
|
*ngIf="this.canEdit(c)"
|
|
|
|
(click)="users(c)"
|
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-fw bwi-users" aria-hidden="true"></i>
|
2018-07-06 18:49:06 +02:00
|
|
|
{{ "users" | i18n }}
|
|
|
|
</a>
|
2021-10-20 23:17:27 +02:00
|
|
|
<a
|
|
|
|
class="dropdown-item text-danger"
|
|
|
|
href="#"
|
|
|
|
appStopClick
|
|
|
|
*ngIf="this.canDelete(c)"
|
|
|
|
(click)="delete(c)"
|
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-fw bwi-trash" aria-hidden="true"></i>
|
2018-07-06 18:49:06 +02:00
|
|
|
{{ "delete" | i18n }}
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-07-06 18:49:06 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</ng-container>
|
2018-07-10 05:48:26 +02:00
|
|
|
<ng-template #addEdit></ng-template>
|
|
|
|
<ng-template #usersTemplate></ng-template>
|