fix: Notizen Listen-Design und alphabetische Sortierung
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 8s

This commit is contained in:
AI Bot
2026-06-19 20:27:57 +00:00
parent d6c9e50f5b
commit 2bdb084bcb
2 changed files with 4 additions and 4 deletions

View File

@@ -233,4 +233,4 @@ Das Projekt basiert auf bewährten Web-Standards:
* **Features:**
* **Notizen:** Neue Funktion "Notizen" hinzugefügt inkl. Rich-Text-Editor.
* **Haushaltsfreigabe:** Notizen können mit dem Haushalt geteilt werden.
* **Design-Update:** Die Notizen-Übersichtsseite wurde an das Design der ToDo-Listen angepasst (Split-View, List-Groups, weiße Notizhintergründe). Der Texteditor bietet nun deutsche Tooltips. Beim Speichern einer Notiz wird nun besser zurück in die Übersicht navigiert. Das Layout der Metainformationen sowie der Buttons wurde weiter optimiert.
* **Design-Update:** Die Notizen-Übersichtsseite wurde an das Design der ToDo-Listen angepasst (Split-View, List-Groups, weiße Notizhintergründe). Der Texteditor bietet nun deutsche Tooltips. Beim Speichern einer Notiz wird nun besser zurück in die Übersicht navigiert. Das Layout der Metainformationen sowie der Buttons wurde weiter optimiert. Die Notizen werden in der Liste alphabetisch sortiert.

View File

@@ -21,7 +21,7 @@ $sql = "SELECT n.*, u.username as owner_name
FROM notes n
JOIN users u ON n.user_id = u.id
WHERE n.user_id = ? OR (n.household_id = ? AND n.is_shared = 1 AND n.household_id IS NOT NULL)
ORDER BY n.updated_at DESC";
ORDER BY n.title ASC";
$stmt = $conn->prepare($sql);
$stmt->bind_param("ii", $current_user_id, $current_user_household_id);
$stmt->execute();
@@ -74,7 +74,7 @@ if ($active_note_id) {
<div class="list-group mb-3 shadow-sm">
<?php foreach ($notes as $note): ?>
<?php $is_active = ($active_note && $active_note['id'] == $note['id']); ?>
<a href="notes.php?id=<?php echo $note['id']; ?>" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center <?php echo $is_active ? 'bg-success text-white fw-bold' : ''; ?>">
<div class="list-group-item list-group-item-action d-flex justify-content-between align-items-center <?php echo $is_active ? 'bg-success text-white fw-bold' : ''; ?>" style="cursor:pointer;" onclick="window.location.href='notes.php?id=<?php echo $note['id']; ?>'">
<div class="text-truncate" style="max-width: 80%;">
<?php echo htmlspecialchars($note['title']); ?>
<div class="small <?php echo $is_active ? 'text-white-50' : 'text-muted'; ?> fw-normal mt-1">
@@ -96,7 +96,7 @@ if ($active_note_id) {
</button>
<?php endif; ?>
</div>
</a>
</div>
<?php endforeach; ?>
<?php if (empty($notes)): ?>
<div class="list-group-item text-muted">Keine Notizen vorhanden.</div>