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
+35 -2
View File
@@ -3,7 +3,39 @@
<form method="post" enctype="multipart/form-data">
<label>{{ t('common.name') }}<input name="name" value="{{category.name if category else ''}}" required></label>
<label>{{ t('common.description') }}<textarea name="description">{{category.description if category and category.description else ''}}</textarea></label>
<label>{{ t('categories.image') }}<input type="file" name="image" accept="image/*"></label>
<div class="form-field category-image-editor" data-image-editor>
<label for="category-image-input">{{ t('categories.image') }}</label>
<div class="asset-edit-image-preview" id="category-current-image-preview" data-image-preview {% if not (category and category.image_path) %}hidden style="display:none"{% endif %}>
<img src="{{ category.image_path if category and category.image_path else '' }}" class="asset-edit-preview-image" alt="">
<div class="asset-edit-image-preview-actions">
<span class="muted">{{ t('categories.current_image', 'Aktuelles Kategoriebild') }}</span>
<button type="button" class="button button-danger button-small" id="remove-category-image-button" data-image-remove aria-pressed="false" {% if not (category and category.image_path) %}hidden disabled{% endif %}>{{ t('categories.remove_image', 'Kategoriebild entfernen') }}</button>
</div>
</div>
<input type="hidden" name="remove_image" id="remove-category-image" value="0" data-image-remove-input>
<div class="image-remove-pending" data-image-remove-pending hidden>{{ t('categories.image_remove_pending', 'Kategoriebild wird beim Speichern entfernt.') }}</div>
<div class="standard-image-library">
<strong>{{ t('images.library', 'Standardbild-Bibliothek') }}</strong>
<div class="muted image-library-help">{{ t('images.library_help', 'Wähle ein bereits vorhandenes Standardbild oder füge ein Bild einmalig zur Bibliothek hinzu.') }}</div>
{% if standard_images %}
<div class="standard-image-grid">
{% for item in standard_images %}
<label class="standard-image-choice" title="{{ item.name }}">
<input type="radio" name="library_image" value="{{ item.path }}" data-image-library-choice data-image-src="{{ item.path }}" {% if category and category.image_path == item.path %}checked{% endif %}>
<img src="{{ item.path }}" alt="">
<span>{{ item.name }}</span>
</label>
{% endfor %}
</div>
{% else %}
<div class="muted image-library-empty">{{ t('images.library_empty', 'Noch keine Standardbilder vorhanden.') }}</div>
{% endif %}
<label class="image-upload-label">{{ t('images.library_upload', 'Neues Standardbild hinzufügen und verwenden') }}
<input type="file" name="library_upload" accept="image/*" data-image-library-upload>
</label>
<small class="muted">{{ t('images.library_upload_help', 'Das Bild wird einmal in der gemeinsamen Bibliothek gespeichert und kann danach bei weiteren Assets und Kategorien wiederverwendet werden.') }}</small>
</div>
</div>
<h2>{{ t('categories.fields_title') }}</h2>
<p class="muted">Labels, descriptions, data types and read-only settings are managed centrally under Settings → Fields.</p>
<table class="data-table"><thead><tr><th>{{ t('common.active') }}</th><th>{{ t('categories.database_field') }}</th><th>{{ t('categories.display_name') }}</th><th>{{ t('categories.required') }}</th><th>{{ t('categories.in_list') }}</th><th>{{ t('categories.readonly') }}</th></tr></thead><tbody>
@@ -13,4 +45,5 @@
<td><input class="checkbox" type="checkbox" name="required_{{definition.id}}" {% if (cfg and cfg.required) or definition.field_name == 'name' %}checked{% endif %}{% if definition.readonly or definition.field_name == 'name' %} disabled{% endif %}></td>
<td><input class="checkbox" type="checkbox" name="list_{{definition.id}}" {% if (cfg and cfg.show_in_list) or definition.field_name == 'name' %}checked{% endif %}></td>
<td>{{ t('common.yes') if definition.readonly else t('common.no') }}</td></tr>{% endfor %}</tbody></table>
<button>💾 {{ t('common.save') }}</button></form>{% endblock %}
<button>💾 {{ t('common.save') }}</button></form>
{% endblock %}