first commit
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Mandanten - mGuard VPN{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1><i class="bi bi-building"></i> Mandanten</h1>
|
||||
<a href="/tenants/new" class="btn btn-primary">
|
||||
<i class="bi bi-plus-lg"></i> Neuer Mandant
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Benutzer</th>
|
||||
<th>Gateways</th>
|
||||
<th>Status</th>
|
||||
<th>Erstellt</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for tenant in tenants %}
|
||||
<tr>
|
||||
<td><strong>{{ tenant.name }}</strong></td>
|
||||
<td>{{ tenant.description or '-' }}</td>
|
||||
<td>{{ tenant.users|length }}</td>
|
||||
<td>{{ tenant.gateways|length }}</td>
|
||||
<td>
|
||||
{% if tenant.is_active %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">Inaktiv</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ tenant.created_at.strftime('%d.%m.%Y') }}</td>
|
||||
<td>
|
||||
<a href="/tenants/{{ tenant.id }}/edit" class="btn btn-sm btn-outline-primary">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
<form action="/tenants/{{ tenant.id }}/delete" method="post" class="d-inline"
|
||||
onsubmit="return confirm('Mandant wirklich löschen?');">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="7" class="text-center text-muted">Keine Mandanten vorhanden</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user