From 05f11872fc50d79d14d7398af6be6f3be0c468c6 Mon Sep 17 00:00:00 2001 From: Brummel Date: Wed, 15 Apr 2026 23:30:30 +0200 Subject: [PATCH] Refactor case detail and document views Introduce a "Back to Cases" button in the document view and update the case detail page to conditionally display the "Analyze" button. Also, add a copy-to-clipboard functionality for the document content. --- server/templates/case_detail.html | 9 +++---- server/templates/document.html | 43 ++++++++++++++++++++++++++++--- server/templates/my_cases.html | 2 +- 3 files changed, 44 insertions(+), 10 deletions(-) diff --git a/server/templates/case_detail.html b/server/templates/case_detail.html index 2fb6760..46d6e82 100644 --- a/server/templates/case_detail.html +++ b/server/templates/case_detail.html @@ -43,14 +43,11 @@ header form { margin: 0; }
{{ case_id }}
-{% if has_document %} -Ergebnis öffnen -{% endif %} {% if analyzing %} wird analysiert … -{% else if can_analyze %} -
-{% else if llm_missing %} +{% else if can_analyze && !has_document %} +
+{% else if llm_missing && !has_document %} LLM-Analyse nicht konfiguriert {% endif %}
diff --git a/server/templates/document.html b/server/templates/document.html index 0cdf020..e2aab82 100644 --- a/server/templates/document.html +++ b/server/templates/document.html @@ -7,18 +7,55 @@ body { font-family: sans-serif; max-width: 900px; margin: 2em auto; padding: 0 1em; } header { display: flex; justify-content: space-between; align-items: center; } header form { margin: 0; } -.back { color: #4a90e2; text-decoration: none; } +.back-button { display: inline-block; padding: 0.5em 1em; background: #4a90e2; color: white; text-decoration: none; border-radius: 4px; font-weight: bold; } pre { white-space: pre-wrap; font-family: serif; font-size: 1.05em; line-height: 1.5; background: #f6f6f6; padding: 1em; border-radius: 4px; } .meta { color: #666; font-family: monospace; font-size: 0.9em; margin-bottom: 1em; } +.copy-btn { padding: 0.5em 1em; font-size: 1em; border: 1px solid #4a90e2; background: white; color: #4a90e2; border-radius: 4px; cursor: pointer; font-weight: bold; } +.copy-btn:hover { background: #eaf3fc; } +.toolbar { display: flex; gap: 0.6em; margin: 1em 0; }
-
← Zurück zum Fall
+
Aufnahmen

Dokument v{{ version }}

{{ case_id }}
-
{{ content }}
+
+ +
+
{{ content }}
+ diff --git a/server/templates/my_cases.html b/server/templates/my_cases.html index ccea9ae..a6c5b4b 100644 --- a/server/templates/my_cases.html +++ b/server/templates/my_cases.html @@ -59,7 +59,7 @@ section h2 { font-size: 1.1em; color: #555; border-bottom: 1px solid #ddd; paddi