Auto-commit before push to git.mycloud24.ru

This commit is contained in:
InviteMe Developer
2026-08-28 15:41:39 +03:00
parent 3bd62cc289
commit a69abb948f
26 changed files with 1908 additions and 171 deletions
+58
View File
@@ -0,0 +1,58 @@
{% extends "base.html" %}
{% block title %}Пользователи — InviteMe{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h1>Пользователи</h1>
<a href="{{ url_for('main.admin_user_add') }}" class="btn btn-primary">Добавить пользователя</a>
</div>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Логин</th>
<th>Роль</th>
<th>Статус</th>
<th>Создан</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr class="{{ 'table-secondary' if not user.is_active }}">
<td>{{ user.username }}</td>
<td>
{% if user.role == 'admin' %}
<span class="badge bg-danger">Админ</span>
{% elif user.role == 'organizer' %}
<span class="badge bg-warning text-dark">Организатор</span>
{% else %}
<span class="badge bg-info text-dark">Сотрудник</span>
{% endif %}
</td>
<td>
{% if user.is_active %}
<span class="badge bg-success">Активен</span>
{% else %}
<span class="badge bg-secondary">Заблокирован</span>
{% endif %}
</td>
<td>{{ user.created_at.strftime('%d.%m.%Y %H:%M') }}</td>
<td>
<a href="{{ url_for('main.admin_user_edit', user_id=user.id) }}" class="btn btn-sm btn-outline-primary">Изменить</a>
{% if current_user.id != user.id %}
<form action="{{ url_for('main.admin_user_delete', user_id=user.id) }}" method="POST" class="d-inline" onsubmit="return confirm('Заблокировать пользователя?')">
<button type="submit" class="btn btn-sm btn-outline-danger">Блок</button>
</form>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="5" class="text-center text-muted">Пользователи не найдены</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}