first commit
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Панель администратора</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<header>
|
||||
<h1>Панель администратора</h1>
|
||||
<p class="hint">Управление пользователями и подтверждение заявок.</p>
|
||||
<a href="{{ url_for('cabinet') }}">← Вернуться в кабинет</a>
|
||||
</header>
|
||||
{% if info_message %}
|
||||
<div class="alert alert-success">{{ info_message }}</div>
|
||||
{% endif %}
|
||||
<section class="cabinet-section">
|
||||
<h2>Пользователи</h2>
|
||||
<ul class="token-list">
|
||||
{% for user in users %}
|
||||
<li class="token-item">
|
||||
<div>
|
||||
<strong>{{ user["username"] }}</strong>
|
||||
{% if user["is_admin"] %}
|
||||
<span class="badge">Администратор</span>
|
||||
{% endif %}
|
||||
{% if user["is_active"] %}
|
||||
<span class="badge">Активен</span>
|
||||
{% else %}
|
||||
<span class="badge badge-inactive">Не активен</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if current_user["id"] != user["id"] %}
|
||||
<form method="post" class="inline-form">
|
||||
<input type="hidden" name="user_id" value="{{ user['id'] }}">
|
||||
{% if user["is_active"] %}
|
||||
<input type="hidden" name="admin_action" value="deactivate">
|
||||
<button type="submit" class="secondary">Отключить</button>
|
||||
{% else %}
|
||||
<input type="hidden" name="admin_action" value="activate">
|
||||
<button type="submit">Активировать</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user