bifroest/app/templates/approvals.html
2026-10-27 08:34:17 +01:00

36 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}Freigaben{% endblock %}
{% macro row(a) %}
<tr>
<td><a href="/approvals/{{ a.id }}">{{ a.arguments.get('title') or a.tool }}</a>
<p class="text-xs text-muted"><code>{{ a.tool }}</code> · {{ sources.get(a.source_id, 'Quelle entfernt') }}</p></td>
<td>{{ workspaces.get(a.workspace_id, '') }}</td>
<td>{{ users.get(a.requested_by, '') }}<p class="text-xs text-muted">{{ a.requested_at.strftime('%d.%m.%Y %H:%M') }}</p></td>
<td><span class="badge {{ 'badge-warning' if a.status == 'pending' else 'badge-success' if a.status == 'executed' else 'badge-default' }}">{{ labels[a.status] }}</span>
{% if a.status == 'pending' %}<p class="text-xs text-muted">läuft ab {{ a.expires_at.strftime('%d.%m. %H:%M') }}</p>{% endif %}</td>
</tr>
{% endmacro %}
{% block content %}
<div class="stack stack-sm">
<h1>Freigaben</h1>
<p class="text-muted">Schreibende Aktionen der KI warten hier auf die Entscheidung eines Workspace-Admins oder Freigebers. Ausgeführt wird genau der angezeigte Stand; offene Anträge laufen nach Ablauf der Frist ab.</p>
</div>
<section class="card"><div class="card-body stack stack-sm">
<h2>Zu entscheiden</h2>
{% if open %}
<div class="table-wrap"><table>
<thead><tr><th>Änderung</th><th>Workspace</th><th>Beantragt</th><th>Status</th></tr></thead>
<tbody>{% for a in open %}{{ row(a) }}{% endfor %}</tbody>
</table></div>
{% else %}<p class="text-muted">Keine offenen Anträge.</p>{% endif %}
</div></section>
<section class="card"><div class="card-body stack stack-sm">
<h2>Zuletzt</h2>
{% if recent %}
<div class="table-wrap"><table>
<thead><tr><th>Änderung</th><th>Workspace</th><th>Beantragt</th><th>Status</th></tr></thead>
<tbody>{% for a in recent %}{{ row(a) }}{% endfor %}</tbody>
</table></div>
{% else %}<p class="text-muted">Noch keine Anträge.</p>{% endif %}
</div></section>
{% endblock %}