Update project files
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<!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="admin.css">
|
||||
</head>
|
||||
<body data-page="users">
|
||||
<div class="layout">
|
||||
<div class="sidebar" id="sidebar"></div>
|
||||
<div class="main">
|
||||
<div class="page-head">
|
||||
<h2>Пользователи</h2>
|
||||
<p class="page-sub">Управление доступом и ролями</p>
|
||||
</div>
|
||||
|
||||
<div class="actions-row" style="margin-bottom:16px">
|
||||
<button class="btn-primary" id="addUserBtn" type="button">
|
||||
<span style="font-size:1.2rem">+</span> Добавить пользователя
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="audit-wrap">
|
||||
<table class="audit-table" id="usersTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Логин</th>
|
||||
<th>Имя</th>
|
||||
<th>Роль</th>
|
||||
<th>Филиалы</th>
|
||||
<th>Статус</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<div class="empty" id="usersEmpty" style="display:none">Пользователи не найдены</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-overlay" id="userModal">
|
||||
<div class="edit-modal" style="max-width:480px">
|
||||
<h3 id="userModalTitle">Новый пользователь</h3>
|
||||
<div class="settings-stack" style="gap:12px;max-width:none">
|
||||
<div class="settings-field">
|
||||
<label>Логин <span style="color:#ef4444">*</span></label>
|
||||
<input type="text" id="uUsername" class="settings-input" placeholder="login" autocomplete="off">
|
||||
</div>
|
||||
<div class="settings-field">
|
||||
<label>Имя</label>
|
||||
<input type="text" id="uName" class="settings-input" placeholder="Имя Фамилия">
|
||||
</div>
|
||||
<div class="settings-field">
|
||||
<label>Роль</label>
|
||||
<select id="uRole" class="settings-input">
|
||||
<option value="admin">Администратор</option>
|
||||
<option value="tutor">Тутор</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="settings-field" id="uBranchesField">
|
||||
<label>Филиалы (мультивыбор)</label>
|
||||
<select id="uBranches" class="settings-input" multiple size="4"></select>
|
||||
<span class="hint" style="font-size:.75rem">Тутор видит только свои филиалы. Выбор: Ctrl/Cmd+клик.</span>
|
||||
</div>
|
||||
<div class="settings-field">
|
||||
<label>Пароль <small id="pwdHint" style="font-weight:400;color:var(--muted)"></small></label>
|
||||
<input type="password" id="uPassword" class="settings-input" placeholder="••••••••">
|
||||
</div>
|
||||
<div class="settings-field" style="flex-direction:row;align-items:center;gap:8px">
|
||||
<input type="checkbox" id="uActive" checked>
|
||||
<label style="margin:0">Активен</label>
|
||||
</div>
|
||||
<div class="card-foot" style="justify-content:flex-end;border-top:none;padding-top:0">
|
||||
<button type="button" class="btn-primary ghost" id="uCancel">Отмена</button>
|
||||
<button type="button" class="btn-primary" id="uSave">Сохранить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toast" id="toast"></div>
|
||||
<script src="admin.js"></script>
|
||||
<script src="js/users.js"></script>
|
||||
<style>
|
||||
.badge-admin,.badge-tutor{font-size:.7rem;font-weight:600;padding:2px 10px;border-radius:999px;white-space:nowrap}
|
||||
.badge-admin{color:#7c3aed;background:rgba(124,58,237,.12)}
|
||||
.badge-tutor{color:var(--accent);background:rgba(37,99,235,.1)}
|
||||
.status-ok{font-size:.72rem;font-weight:600;color:#16a34a;background:rgba(22,163,74,.12);border-radius:999px;padding:2px 10px;white-space:nowrap}
|
||||
.status-off{font-size:.72rem;font-weight:600;color:#ef4444;background:rgba(239,68,68,.12);border-radius:999px;padding:2px 10px;white-space:nowrap}
|
||||
.row-btn{background:none;border:none;color:var(--muted);cursor:pointer;font-size:1.05rem;padding:4px 8px;border-radius:6px}
|
||||
.row-btn:hover{background:var(--bg);color:var(--accent)}
|
||||
.row-btn.del:hover{color:#ef4444;background:rgba(239,68,68,.1)}
|
||||
.user-branches{max-width:220px;color:var(--muted);font-size:.78rem}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user