Files
aza/AzA march 2026/intern_portal/templates/documents_list.html

58 lines
1.6 KiB
HTML
Raw Normal View History

2026-05-23 21:31:34 +02:00
{% extends "layout.html" %}
{% set active = 'documents' %}
{% block page_title %}Dokumente AzA Intern{% endblock %}
{% block content %}
<div class="page-header">
<h2>Dokumente</h2>
<a href="/documents/new" class="btn btn-primary">Neu</a>
</div>
<div class="hint-banner">
Keine Patientendaten, API-Keys oder Passwörter in Dokumenten speichern.
</div>
{% if message == 'deleted' %}
<div class="alert alert-success">Dokument gelöscht.</div>
{% endif %}
{% if documents %}
<table>
<thead>
<tr>
<th>Titel</th>
<th>Kategorie</th>
<th>Aufgabe</th>
<th>Zuletzt geändert</th>
<th>Erstellt von</th>
<th></th>
</tr>
</thead>
<tbody>
{% for d in documents %}
<tr>
<td>{{ d.title }}</td>
<td>{{ d.category or '' }}</td>
<td>
{% if d.task_id %}
<a href="/tasks/{{ d.task_id }}">{{ d.task_title or ('#' ~ d.task_id) }}</a>
{% else %}{% endif %}
</td>
<td>{{ d.updated_at }}</td>
<td>{{ d.creator_username }}</td>
<td class="file-actions">
<a href="/documents/{{ d.id }}" class="btn btn-sm btn-primary">Öffnen</a>
<form method="post" action="/documents/{{ d.id }}/delete" style="display:inline"
onsubmit="return confirm('Dokument wirklich löschen?');">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<button type="submit" class="btn btn-sm btn-danger">Löschen</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="empty-state">Noch keine Dokumente. <a href="/documents/new">Neues Dokument erstellen</a></p>
{% endif %}
{% endblock %}