update
This commit is contained in:
30
internal/handler/templates/pages/users.html
Normal file
30
internal/handler/templates/pages/users.html
Normal file
@ -0,0 +1,30 @@
|
||||
{{define "title"}}用户管理 · 管理后台{{end}}
|
||||
{{define "barLabel"}}管理后台 · 用户管理{{end}}
|
||||
{{define "barRight"}}<a href="/admin/logout">退出</a>{{end}}
|
||||
{{define "content"}}
|
||||
{{template "bar" .}}
|
||||
<div class="main">
|
||||
<h1>用户管理({{len .Users}})</h1>
|
||||
<p class="muted">图片质量模型已统一:所有用户(含未登录)看图集详情均走同一高清样式,不再按等级分级。</p>
|
||||
<table>
|
||||
<thead><tr><th>ID</th><th>用户名</th><th>邮箱</th><th>等级</th><th>操作</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Users}}<tr>
|
||||
<td><code>{{.ID}}</code></td>
|
||||
<td>{{.Username}}</td>
|
||||
<td class="muted">{{.Email}}</td>
|
||||
<td>{{if eq .Tier "vip"}}<span class="badge vip">VIP</span>{{else}}<span class="badge free">FREE</span>{{end}}</td>
|
||||
<td>
|
||||
<form class="tier" method="post" action="/admin/users/{{.ID}}/tier">
|
||||
<select name="tier">
|
||||
<option value="free" {{if eq .Tier "free"}}selected{{end}}>free(普通)</option>
|
||||
<option value="vip" {{if eq .Tier "vip"}}selected{{end}}>vip</option>
|
||||
</select>
|
||||
<button type="submit">保存</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user