72 lines
1.8 KiB
HTML
72 lines
1.8 KiB
HTML
{#
|
|
Datei: templates/admin.html
|
|
Autor: Björn Runden <br@runden.de>
|
|
Datum: 2026-06-17
|
|
Zweck: Admin-Ansicht mit Übersicht aller Clients, Projekte und Nutzer.
|
|
Variablen: user, clients (list), projects (list), users (list)
|
|
#}
|
|
{% extends "base.html" %}
|
|
|
|
{% block title %}Admin Cockpit{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Admin Cockpit</h1>
|
|
|
|
<section>
|
|
<h2>Clients</h2>
|
|
<table>
|
|
<thead><tr><th>ID</th><th>Name</th></tr></thead>
|
|
<tbody>
|
|
{% for c in clients %}
|
|
<tr><td>{{ c.id }}</td><td>{{ c.name }}</td></tr>
|
|
{% else %}
|
|
<tr><td colspan="2">Keine Clients vorhanden.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Projekte</h2>
|
|
<table>
|
|
<thead><tr><th>ID</th><th>Name</th><th>Client</th></tr></thead>
|
|
<tbody>
|
|
{% for p in projects %}
|
|
<tr>
|
|
<td>{{ p.id }}</td>
|
|
<td><a href="{{ url_for('main.projekt', project_id=p.id) }}">{{ p.name }}</a></td>
|
|
<td>{{ p.client.name }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="3">Keine Projekte vorhanden.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Nutzer</h2>
|
|
<table>
|
|
<thead><tr><th>Zitadel-ID (sub)</th><th>E-Mail</th><th>Rolle</th></tr></thead>
|
|
<tbody>
|
|
{% for u in users %}
|
|
<tr>
|
|
<td><code>{{ u.zitadel_user_id }}</code></td>
|
|
<td>{{ u.email }}</td>
|
|
<td>{{ u.global_role }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="3">Keine Nutzer in der DB.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Aktionen</h2>
|
|
<button class="btn" disabled title="Noch nicht implementiert">Gesamtexport (CSV)</button>
|
|
</section>
|
|
|
|
<p><a href="{{ url_for('main.index') }}">← Zurück zum Dashboard</a></p>
|
|
{% endblock %}
|