Files
wildberries/remote_copy/templates/admin.html
T
2026-05-06 13:28:54 +03:00

54 lines
2.5 KiB
HTML

<!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>