feat: add admin panel
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<!doctype html>
|
||||
<html dir="rtl" lang="fa">
|
||||
{{template "head" .}}
|
||||
<body>
|
||||
{{template "nav" .}}
|
||||
<div class="wrap">
|
||||
<h1>کاربران</h1>
|
||||
{{if .Saved}}<div class="saved">انجام شد ✓</div>{{end}}
|
||||
|
||||
<form class="search" method="get" action="/admin/users">
|
||||
<input type="text" name="q" value="{{.Q}}" placeholder="جستجوی شماره موبایل">
|
||||
<button>جستجو</button>
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<tr><th>#</th><th>موبایل</th><th>سکه</th><th>بلیط</th><th>سطح</th><th>جام</th><th>ادمین</th><th>تغییر سکه (+/-)</th></tr>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td>{{.Mobile}}</td>
|
||||
<td>{{.Coins}}</td>
|
||||
<td>{{.Tickets}}</td>
|
||||
<td>{{.Level}}</td>
|
||||
<td>{{.Trophy}}</td>
|
||||
<td>{{if .IsAdmin}}✓{{end}}</td>
|
||||
<td>
|
||||
<form method="post" action="/admin/users/coins" style="display:flex;gap:6px">
|
||||
<input type="hidden" name="user_id" value="{{.ID}}">
|
||||
<input name="amount" placeholder="مثلاً 500 یا -200">
|
||||
<button>اعمال</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user