first Commit
This commit is contained in:
86
templates/manage_staff.html
Normal file
86
templates/manage_staff.html
Normal file
@@ -0,0 +1,86 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-section-title">
|
||||
<h1>Bearbeiterverwaltung</h1>
|
||||
<p>Admins und Bearbeiter verwalten sowie Passwort-Resets ausloesen.</p>
|
||||
</div>
|
||||
|
||||
<div class="content-stack-wide">
|
||||
<div class="grid">
|
||||
<article class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title"><i class="ti ti-user-plus me-1"></i>Bearbeiter anlegen</h2>
|
||||
<form method="post" action="{{ url_for('manage_staff') }}">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Benutzername</label>
|
||||
<input class="form-control" type="text" name="username" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Vollstaendiger Name</label>
|
||||
<input class="form-control" type="text" name="full_name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Rolle</label>
|
||||
<select class="form-select" name="role" required>
|
||||
<option value="staff">Bearbeiter</option>
|
||||
<option value="admin">Admin</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit"><i class="ti ti-user-plus me-1"></i>Bearbeiter speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title"><i class="ti ti-users-group me-1"></i>Bearbeiterverwaltung</h2>
|
||||
</div>
|
||||
{% if staff_users %}
|
||||
<div class="table-responsive table-wrap">
|
||||
<table class="table table-vcenter card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Benutzername</th>
|
||||
<th>Rolle</th>
|
||||
<th>Status</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for staff in staff_users %}
|
||||
<tr>
|
||||
<td>{{ staff.full_name }}</td>
|
||||
<td>{{ staff.username }}</td>
|
||||
<td>{{ staff.role }}</td>
|
||||
<td>
|
||||
{% if staff.must_set_password %}
|
||||
Passwort ausstehend
|
||||
{% else %}
|
||||
Aktiv
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
<form method="post" action="{{ url_for('reset_staff_password', staff_id=staff.id) }}">
|
||||
<button class="btn btn-primary btn-sm" type="submit"><i class="ti ti-refresh me-1"></i>Passwort reset</button>
|
||||
</form>
|
||||
<form method="post" action="{{ url_for('delete_staff', staff_id=staff.id) }}" onsubmit="return confirm('Bearbeiter wirklich loeschen?');">
|
||||
<button class="btn btn-danger btn-sm" type="submit"><i class="ti ti-trash me-1"></i>Loeschen</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card-body"><p class="mb-0">Keine Bearbeiter vorhanden.</p></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user