diff --git a/app.py b/app.py index 8261be1..1d52303 100644 --- a/app.py +++ b/app.py @@ -353,11 +353,44 @@ def view_document(doc_id: int): raise HTTPException(404, "not found") rendered = md.markdown(d["content_md"] or "", extensions=["fenced_code", "tables", "nl2br"]) + projects = get_projects() + project_list = "\\n".join([f"{p['id']}: {p['name']}" for p in projects]) + body = f"""

Dokument #{d['id']} – {d['title']}

-

Projekt: {d['project']} · Typ: {d['kind']} · {d['created_at']}

-

Download .md

+

+ Projekt: {d['project']} · Typ: {d['kind']} · {d['created_at']} +    + ⬇️ + ✏️ + 📁 + 🗑️ +

{rendered}
+ + """ return layout("Dokument", body)