fix(diarization-ui): restore rename handler script parsing and make library 'Ansehen' an icon button
This commit is contained in:
13
app.py
13
app.py
@@ -314,13 +314,16 @@ def library(project_id: Optional[int] = None):
|
||||
items = "".join(
|
||||
[
|
||||
f"<div class='card'><b>#{d['id']}</b> [{d['kind']}] {d['title']}<br><small>{d['project']} · {d['created_at']}</small><br>"
|
||||
f"<a href='/document/{d['id']}'>Ansehen</a> | <a href='/document/{d['id']}/download.md'>Download .md</a>"
|
||||
f"<div class='row' style='margin-top:8px'>"
|
||||
f"<a href='/document/{d['id']}' style='text-decoration:none'><button type='button'>👁️ Ansehen</button></a>"
|
||||
f"<a href='/document/{d['id']}/download.md' style='text-decoration:none'><button type='button'>⬇️ .md</button></a>"
|
||||
f"</div>"
|
||||
f"<form method='post' action='/document/{d['id']}/rename' class='row' style='margin-top:8px'>"
|
||||
f"<input name='title' value='{d['title']}'><button>Umbenennen</button></form>"
|
||||
f"<input name='title' value='{d['title']}'><button>✏️ Umbenennen</button></form>"
|
||||
f"<form method='post' action='/document/{d['id']}/move' class='row' style='margin-top:6px'>"
|
||||
f"<select name='project_id'>{proj_opts}</select><button>Verschieben</button></form>"
|
||||
f"<select name='project_id'>{proj_opts}</select><button>📁 Verschieben</button></form>"
|
||||
f"<form method='post' action='/document/{d['id']}/delete' onsubmit=\"return confirm('Dokument löschen?')\" style='margin-top:6px'>"
|
||||
f"<button>Löschen</button></form></div>"
|
||||
f"<button>🗑️ Löschen</button></form></div>"
|
||||
for d in docs
|
||||
]
|
||||
)
|
||||
@@ -382,7 +385,7 @@ window.renameDoc = function() {{
|
||||
}};
|
||||
window.moveDoc = function() {{
|
||||
const info = {json.dumps(project_list)};
|
||||
const v = prompt('Ziel-Projekt-ID eingeben:\n'+info, '');
|
||||
const v = prompt('Ziel-Projekt-ID eingeben\\n'+info, '');
|
||||
if (v===null) return;
|
||||
window.postForm('/document/{doc_id}/move', {{project_id:v}});
|
||||
}};
|
||||
|
||||
Reference in New Issue
Block a user