Files
MClogger/web/templates/admin/users.html
SimolZimol c9c684f97a modified: web/blueprints/auth.py
modified:   web/blueprints/group_admin.py
	modified:   web/blueprints/panel.py
	modified:   web/blueprints/site_admin.py
	modified:   web/templates/admin/base.html
	modified:   web/templates/admin/dashboard.html
	modified:   web/templates/admin/group_edit.html
	modified:   web/templates/admin/group_members.html
	modified:   web/templates/admin/groups.html
	modified:   web/templates/admin/user_edit.html
	modified:   web/templates/admin/users.html
	modified:   web/templates/auth/admin_login.html
	modified:   web/templates/auth/login.html
	modified:   web/templates/base.html
	modified:   web/templates/group_admin/base.html
	modified:   web/templates/group_admin/dashboard.html
	modified:   web/templates/group_admin/database.html
	modified:   web/templates/group_admin/member_edit.html
	modified:   web/templates/group_admin/members.html
	modified:   web/templates/panel/no_db.html
2026-04-01 02:55:32 +02:00

54 lines
2.3 KiB
HTML

{% extends "admin/base.html" %}
{% block title %}Users{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h2><i class="bi bi-people-fill me-2"></i>Users</h2>
<a href="{{ url_for('site_admin.user_new') }}" class="btn btn-success">
<i class="bi bi-person-plus-fill me-1"></i>New User
</a>
</div>
<div class="card border-secondary">
<div class="card-body p-0">
<table class="table table-hover mb-0">
<thead>
<tr><th>User</th><th>Groups</th><th>Site Admin</th><th>Created</th><th class="text-end">Actions</th></tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td class="fw-semibold">{{ u.username }}</td>
<td>
{% for g in u.groups %}
<span class="badge bg-secondary me-1">{{ g.name }}
{% if g.role == 'admin' %}<i class="bi bi-star-fill ms-1 text-warning"></i>{% endif %}
</span>
{% else %}<span class="text-muted small">None</span>{% endfor %}
</td>
<td>
{% if u.is_site_admin %}
<span class="badge bg-danger"><i class="bi bi-shield-fill me-1"></i>Site Admin</span>
{% else %}—{% endif %}
</td>
<td class="text-muted small">{{ u.created_at | fmt_dt }}</td>
<td class="text-end">
<a href="{{ url_for('site_admin.user_edit', user_id=u.id) }}" class="btn btn-sm btn-outline-warning" title="Edit">
<i class="bi bi-pencil"></i>
</a>
<form method="post" action="{{ url_for('site_admin.user_delete', user_id=u.id) }}" class="d-inline"
onsubmit="return confirm('Delete user {{ u.username }}?')">
<button type="submit" class="btn btn-sm btn-outline-danger" title="Delete">
<i class="bi bi-trash3"></i>
</button>
</form>
</td>
</tr>
{% else %}
<tr><td colspan="5" class="text-muted text-center py-4">No users yet.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}