common-ui/src/lib/listing/table-header/table-header.component.html
2024-07-16 13:32:58 +03:00

57 lines
2.0 KiB
HTML

<div [class.selection-enabled]="selectionEnabled" class="header-item">
<div class="header-title">
@if (selectionEnabled) {
<iqser-round-checkbox
(click)="listingService.selectAll()"
[active]="listingService.areAllSelected$ | async"
[indeterminate]="listingService.notAllSelected$ | async"
id="select-all-entities-toggle"
></iqser-round-checkbox>
}
<span [attr.help-mode-key]="helpModeKey" class="all-caps-label">
{{ tableHeaderLabel | translate: { length: totalSize || (listingService.displayedLength$ | async) } }}
@if (listingService.selectedLength$ | async; as selectedItems) {
<span> ({{ 'table-header.selected-count' | translate: { count: selectedItems } }}) </span>
}
</span>
</div>
<ng-container [ngTemplateOutlet]="bulkActions"></ng-container>
@if (quickFilters$ | async) {
<iqser-quick-filters></iqser-quick-filters>
}
<!-- Custom content-->
<ng-content></ng-content>
</div>
@if (listingMode === listingModes.table) {
<div
[class.no-data]="entitiesService.noData$ | async"
[class.selection-enabled]="selectionEnabled"
class="table-header"
iqserSyncWidth="table-item"
>
@if (selectionEnabled) {
<div class="select-oval-placeholder"></div>
}
@for (config of tableColumnConfigs; track config) {
<iqser-table-column-name
[class]="config.class"
[id]="config.id"
[label]="config.notTranslatable ? config.label : (config.label | translate)"
[leftIcon]="config.leftIcon"
[rightIconTooltip]="config.rightIconTooltip"
[rightIcon]="config.rightIcon"
[sortByKey]="config.sortByKey"
></iqser-table-column-name>
}
@if (hasEmptyColumn) {
<div></div>
}
<div class="scrollbar-placeholder"></div>
</div>
}