Files
dodep-simulator/templates/admin/users.html
T
root 3fe8a47e04 Dildo items, admin fixes, UI refactor
- Add 85 custom Dildo items (knife/skin pattern names, various rarities)
- Create Dildo Case config (hidden, items obtained via contracts)
- Fix admin user_detail.html nested script tag (Notify fallback removed)
- Fix admin cases.html embedded script tag
- Add notifications.js to admin base.html
- Fix admin users.html: use counts instead of relationship lists
- Replace old money format with |money filter across all templates
- Standardize nav partial (_nav.html) with active_page highlighting
- Fix RARITY_COLORS rename in activity sidebar
- Fix toast animation (forwards) and remove duplicate CSS
- Replace showToast() with Notify.* in upgrade page
- Add cs2_simulator.db and *.log to .gitignore
- Create remote-deploy.sh with DB exclusion
2026-07-05 16:15:12 +00:00

73 lines
2.6 KiB
HTML

{% extends "admin/base.html" %}
{% block title %}Пользователи — Админ-панель{% endblock %}
{% block nav_users %}active{% endblock %}
{% block page_title %}👥 Пользователи{% endblock %}
{% block top_actions %}
<div class="a-flex">
<input type="text" id="userSearch" class="a-input a-input-sm" style="width:200px" placeholder="Поиск по имени..." value="{{ search or '' }}">
<button class="a-btn a-btn-primary" onclick="searchUsers()">🔍 Найти</button>
</div>
{% endblock %}
{% block content %}
{% if users %}
<div class="a-table-wrap">
<table class="a-table">
<thead>
<tr>
<th>ID</th>
<th>Имя</th>
<th>Баланс</th>
<th>Статус</th>
<th>Кейсов</th>
<th>Контрактов</th>
<th>Предметов</th>
<th></th>
</tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td>{{ u.id }}</td>
<td>
<a href="/admin/user/{{ u.id }}" style="color:#f59e0b;text-decoration:none;font-weight:500">
{{ u.username }}
</a>
</td>
<td>{{ u.balance|money }} ₽</td>
<td>
{% if u.is_admin %}<span class="a-badge a-badge-admin">Админ</span>{% endif %}
{% if u.is_banned %}<span class="a-badge a-badge-banned">Забанен</span>{% endif %}
{% if not u.is_admin and not u.is_banned %}<span class="a-badge a-badge-user">Игрок</span>{% endif %}
</td>
<td>{{ u.case_openings }}</td>
<td>{{ u.contracts }}</td>
<td>{{ u.inventory_count }}</td>
<td class="td-actions">
<a href="/admin/user/{{ u.id }}" class="a-btn a-btn-sm">✏️</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="a-empty">
<div class="a-empty-icon">📭</div>
<h3>Пользователи не найдены</h3>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script>
function searchUsers() {
const q = document.getElementById('userSearch').value.trim();
window.location.href = '/admin/users' + (q ? '?search=' + encodeURIComponent(q) : '');
}
document.getElementById('userSearch').addEventListener('keydown', e => {
if (e.key === 'Enter') searchUsers();
});
</script>
{% endblock %}