From 6da4279e5a1a7f0391693be87be436c713f3899a Mon Sep 17 00:00:00 2001 From: Christoph Marzell Date: Fri, 7 Aug 2026 06:48:30 +0200 Subject: [PATCH] fix view --- app/views/entries/index.html.erb | 59 +++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/app/views/entries/index.html.erb b/app/views/entries/index.html.erb index d48dcd1..232820f 100644 --- a/app/views/entries/index.html.erb +++ b/app/views/entries/index.html.erb @@ -30,6 +30,44 @@ #combinationOverviewTable tbody tr:hover { filter: brightness(0.98); } + + /* Dieselben Typfarben auch in der Einträge-Tabelle */ + #entriesTable tbody tr.type-propaedeutikum { + --bs-table-bg: rgba(13, 110, 253, 0.06); + --bs-table-striped-bg: rgba(13, 110, 253, 0.10); + --bs-table-hover-bg: rgba(13, 110, 253, 0.14); + } + + #entriesTable tbody tr.type-fachspezifikum { + --bs-table-bg: rgba(25, 135, 84, 0.06); + --bs-table-striped-bg: rgba(25, 135, 84, 0.10); + --bs-table-hover-bg: rgba(25, 135, 84, 0.14); + } + + #entriesTable tbody tr.type-mediation { + --bs-table-bg: rgba(253, 126, 20, 0.07); + --bs-table-striped-bg: rgba(253, 126, 20, 0.11); + --bs-table-hover-bg: rgba(253, 126, 20, 0.15); + } + + #entriesTable tbody tr.type-propaedeutikum > td:first-child { + border-left: 4px solid #0d6efd; + } + + #entriesTable tbody tr.type-fachspezifikum > td:first-child { + border-left: 4px solid #198754; + } + + #entriesTable tbody tr.type-mediation > td:first-child { + border-left: 4px solid #fd7e14; + } + + /* Heutige Einträge bleiben zusätzlich klar erkennbar */ + #entriesTable tbody tr.entry-today { + font-weight: 600; + box-shadow: inset 0 2px 0 rgba(255, 193, 7, 0.75), + inset 0 -2px 0 rgba(255, 193, 7, 0.75); + }

Meine Einträge

@@ -441,9 +479,28 @@ <% is_today = entry.date == Date.current %> + <% + entry_type_class = + case entry.praktikums_typ + when "propädeutikum" + "type-propaedeutikum" + when "fachspezifikum" + "type-fachspezifikum" + when "mediation" + "type-mediation" + else + "" + end + + entry_row_classes = [ + entry_type_class, + ("entry-today" if is_today) + ].compact.reject(&:blank?).join(" ") + %> + <%= entry.date.strftime('%d.%m.%Y') %>