webcrawler v1.0
This commit is contained in:
parent
008e2bc274
commit
6b057fb941
19 changed files with 814 additions and 112 deletions
50
app/templates/admin_panel.html
Normal file
50
app/templates/admin_panel.html
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="admin-panel">
|
||||
<h2>Benutzerverwaltung</h2>
|
||||
|
||||
<!-- Tabelle für Benutzerverwaltung -->
|
||||
<table class="user-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Benutzername</th>
|
||||
<th>Admin</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{ user.id }}</td>
|
||||
<td>{{ user.username }}</td>
|
||||
<td>{{ 'Ja' if user.is_admin else 'Nein' }}</td>
|
||||
<td>
|
||||
<form action="{{ url_for('auth.reset_password', user_id=user.id) }}" method="post" style="display:inline;">
|
||||
<input type="text" name="new_password" placeholder="Neues Passwort" required>
|
||||
<button type="submit" class="reset-btn">Passwort zurücksetzen</button>
|
||||
</form>
|
||||
{% if not user.is_admin %}
|
||||
<form action="{{ url_for('auth.delete_user', user_id=user.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="delete-btn">Benutzer löschen</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Formular zum Erstellen neuer Benutzer -->
|
||||
<h3>Neuen Benutzer erstellen</h3>
|
||||
<form action="{{ url_for('auth.create_user') }}" method="post" class="create-user-form">
|
||||
<input type="text" name="username" placeholder="Benutzername" required>
|
||||
<input type="password" name="password" placeholder="Passwort" required>
|
||||
<label>
|
||||
<input type="checkbox" name="is_admin"> Admin
|
||||
</label>
|
||||
<button type="submit" class="create-btn">Benutzer erstellen</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue