This commit is contained in:
Radek
2025-03-31 10:46:49 +01:00
parent 9b778e1cc9
commit dafa85963c
11 changed files with 279 additions and 0 deletions

47
app/templates/admin.html Normal file
View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard</title>
<link href="{{ url_for('static', filename='css/styles.css') }}" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="{{ url_for('home') }}">Home</a></li>
<li><a href="{{ url_for('admin') }}">Admin</a></li>
<li><a href="{{ url_for('logout') }}">Logout</a></li>
</ul>
</nav>
</header>
<main>
<h1>Admin Dashboard</h1>
<section>
<h2>Manage Users</h2>
<table>
<thead>
<tr>
<th>Username</th>
<th>Role</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.username }}</td>
<td>{{ user.role }}</td>
<td>
<button onclick="editUser('{{ user.username }}')">Edit</button>
<button onclick="deleteUser('{{ user.username }}')">Delete</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
</main>
</body>
</html>