From 3b0d49995850c8b313aaf03286fd5d5fc1877371 Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Wed, 23 Sep 2026 16:25:30 +0200 Subject: [PATCH] changes to implement a filter option for the student cards --- Web/templates/student_cards_admin.html | 133 ++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 14 deletions(-) diff --git a/Web/templates/student_cards_admin.html b/Web/templates/student_cards_admin.html index b25075d..e41b35b 100644 --- a/Web/templates/student_cards_admin.html +++ b/Web/templates/student_cards_admin.html @@ -1,11 +1,3 @@ - {% extends "base.html" %} {% block title %}Bibliotheksausweise - Inventarsystem{% endblock %} @@ -21,7 +13,6 @@ gap: 15px; } - /* Neu strukturiertes Layout für Formular & Import */ .dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; @@ -145,6 +136,38 @@ background: #5a6268; } + /* Filter Controls Styling */ + .filter-bar { + display: flex; + gap: 12px; + margin-bottom: 15px; + flex-wrap: wrap; + align-items: center; + background: var(--ui-bg); + padding: 12px; + border-radius: 8px; + border: 1px solid #ddd; + } + + .filter-bar input, + .filter-bar select { + padding: 8px 12px; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 14px; + } + + .filter-bar input { + flex: 1; + min-width: 200px; + } + + .filter-counter { + font-size: 13px; + color: #666; + margin-left: auto; + } + .cards-table { width: 100%; border-collapse: collapse; @@ -255,7 +278,8 @@ } :root[data-theme="dark"] .student-card-form, - :root[data-theme="dark"] .import-card { + :root[data-theme="dark"] .import-card, + :root[data-theme="dark"] .filter-bar { background: var(--ui-surface) !important; color: var(--ui-text) !important; border-color: var(--ui-border) !important; @@ -269,7 +293,8 @@ :root[data-theme="dark"] .import-card p, :root[data-theme="dark"] .rollover-hint, :root[data-theme="dark"] .empty-state, - :root[data-theme="dark"] .empty-state p { + :root[data-theme="dark"] .empty-state p, + :root[data-theme="dark"] .filter-counter { color: var(--ui-text-muted) !important; } @@ -286,6 +311,8 @@ :root[data-theme="dark"] .form-group input, :root[data-theme="dark"] .form-group select, :root[data-theme="dark"] .form-group textarea, + :root[data-theme="dark"] .filter-bar input, + :root[data-theme="dark"] .filter-bar select, :root[data-theme="dark"] .export-buttons form, :root[data-theme="dark"] .export-buttons select { background: var(--ui-bg) !important; @@ -297,6 +324,8 @@ :root[data-theme="dark"] .form-group input:focus, :root[data-theme="dark"] .form-group select:focus, :root[data-theme="dark"] .form-group textarea:focus, + :root[data-theme="dark"] .filter-bar input:focus, + :root[data-theme="dark"] .filter-bar select:focus, :root[data-theme="dark"] .export-buttons select:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22) !important; @@ -334,6 +363,16 @@ .export-buttons > a { flex: 1 1 100%; } + + .filter-bar { + flex-direction: column; + align-items: stretch; + } + + .filter-counter { + margin-left: 0; + text-align: right; + } } @media (max-width: 992px) { @@ -503,7 +542,20 @@

Registrierte Ausweise

{% if student_cards %} - + +
+ + + + Angezeigt: {{ student_cards|length }} / {{ student_cards|length }} +
+ +
@@ -516,7 +568,7 @@ {% for card in student_cards %} - + @@ -546,6 +598,10 @@ {% endfor %}
Ausweis-ID
{{ card.AusweisId }} {{ card.SchülerName }} {{ card.Klasse or '—' }}
+ + {% else %}

Keine Bibliotheksausweise registriert.

@@ -557,7 +613,56 @@ {% endblock %} \ No newline at end of file