Spaces:
Sleeping
Sleeping
File size: 1,919 Bytes
c001f24 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
{% extends "base.html" %}
{% block title %}Manage Users{% endblock %}
{% block content %}
<div class="container mt-4">
<h2>Manage Users</h2>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<div class="card mb-4">
<div class="card-header">Create New User</div>
<div class="card-body">
<form action="{{ url_for('user_manager.create_user') }}" method="POST">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<button type="submit" class="btn btn-primary">Create User</button>
</form>
</div>
</div>
<div class="card">
<div class="card-header">Existing Users</div>
<div class="card-body">
<ul class="list-group">
{% for user in users %}
<li class="list-group-item d-flex justify-content-between align-items-center">
{{ user.username }}
<a href="{{ url_for('user_manager.switch_user', username=user.username) }}" class="btn btn-sm btn-outline-primary">Switch to this user</a>
</li>
{% else %}
<li class="list-group-item">No users found. Create one above!</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endblock %}
|