fix table with handling, icons implemented

This commit is contained in:
root
2026-08-09 08:50:13 +02:00
parent 5e32be7d0c
commit 3ff0794cfc
43 changed files with 1027 additions and 95 deletions
+21 -17
View File
@@ -122,19 +122,20 @@
</dialog>
<div class="table-scroll management-table-scroll">
<table class="data-table categories-table">
<table class="data-table categories-table" data-storage-key="categories">
<thead>
<tr>
<th class="selection-column" data-no-sort="1" data-no-filter="1">
<th class="selection-column" data-no-sort="1" data-no-filter="1" data-field="selection">
<input type="checkbox" id="select-all-categories" aria-label="{{ t('categories.select_all', 'Alle Kategorien markieren') }}">
</th>
<th>{{ t('common.name') }}</th>
<th>{{ t('common.assets') }}</th>
<th>{{ t('categories.fields_total', 'Felder gesamt') }}</th>
<th>{{ t('categories.active_fields') }}</th>
<th>{{ t('categories.list_fields', 'In Liste') }}</th>
<th>{{ t('categories.attributes', 'Aktive Attribute') }}</th>
<th data-no-filter="1" data-no-sort="1">{{ t('common.actions') }}</th>
<th data-no-sort="1" data-no-filter="1" data-field="category_image">{{ t('categories.image', 'Bild') }}</th>
<th data-field="name">{{ t('common.name') }}</th>
<th data-field="assets_count">{{ t('common.assets') }}</th>
<th data-field="fields_total">{{ t('categories.fields_total', 'Felder gesamt') }}</th>
<th data-field="active_fields">{{ t('categories.active_fields') }}</th>
<th data-field="list_fields">{{ t('categories.list_fields', 'In Liste') }}</th>
<th data-field="attributes">{{ t('categories.attributes', 'Aktive Attribute') }}</th>
<th data-no-filter="1" data-no-sort="1" data-field="actions">{{ t('common.actions') }}</th>
</tr>
</thead>
<tbody>
@@ -143,23 +144,26 @@
{% set active_fields = c.visible_fields|selectattr('active')|list %}
{% set list_fields = active_fields|selectattr('show_in_list')|list %}
<tr>
<td class="selection-column">
<td class="selection-column" data-field="selection">
<input class="category-select" type="checkbox" form="category-bulk-form" name="category_ids" value="{{ c.id }}"
aria-label="{{ c.name|e }} {{ t('common.select', 'markieren') }}">
</td>
<td>{{ c.name }}</td>
<td>{{ count }}</td>
<td>{{ c.visible_fields|length }}</td>
<td>{{ active_fields|length }}</td>
<td>{{ list_fields|length }}</td>
<td class="category-attributes">
<td class="category-image-cell" data-field="category_image">
{% if c.image_path %}<img src="{{ c.image_path }}" alt="" class="category-table-image">{% else %}<span class="asset-list-device-placeholder" aria-hidden="true"></span>{% endif %}
</td>
<td data-field="name">{{ c.name }}</td>
<td data-field="assets_count">{{ count }}</td>
<td data-field="fields_total">{{ c.visible_fields|length }}</td>
<td data-field="active_fields">{{ active_fields|length }}</td>
<td data-field="list_fields">{{ list_fields|length }}</td>
<td class="category-attributes" data-field="attributes">
{% for field in active_fields %}
<span class="attribute-chip{% if field.show_in_list %} attribute-chip-list{% endif %}" title="{{ t('categories.shown_in_list', 'In Liste sichtbar') if field.show_in_list else t('categories.active_only', 'Aktiv, aber nicht in Liste sichtbar') }}">{{ field_label(field) }}</span>
{% else %}
<span class="muted">{{ t('categories.no_active_fields', 'Keine aktiven Felder') }}</span>
{% endfor %}
</td>
<td class="category-actions">
<td class="category-actions" data-field="actions">
<div class="action-buttons">
<a class="button button-secondary" href="/categories/{{ c.id }}/edit" title="{{ t('common.edit') }}">{{ t('common.edit') }}</a>
<button type="submit" class="button button-secondary" form="duplicate-category-{{ c.id }}" title="{{ t('common.duplicate') }}">{{ t('common.duplicate') }}</button>