Files
subtrack/internal/web/templates/pages/logs.html
T
chun_qiu f047662129
build / build-and-test (push) Failing after 1m24s
首次推送
2026-10-18 19:44:38 +08:00

40 lines
1.4 KiB
HTML

{{define "content"}}
<div class="page">
<header class="page-head">
<div>
<h1>操作日志</h1>
<p class="muted">共 {{.D.Total}} 条 · 谁在什么时候改了什么,都在这里</p>
</div>
</header>
<form class="filterbar" method="get" action="/logs">
<input type="search" name="q" value="{{.D.Q}}" placeholder="搜索摘要 / 动作 / 操作人" autocomplete="off">
<button class="btn" type="submit">搜索</button>
{{if .D.Q}}<a class="btn btn-ghost" href="/logs">清除</a>{{end}}
</form>
{{if .D.List}}
<div class="table-wrap">
<table class="table tight">
<thead><tr><th>时间</th><th>操作人</th><th>动作</th><th>对象</th><th>摘要</th><th>IP</th></tr></thead>
<tbody>
{{range .D.List}}
<tr>
<td class="mono small">{{.CreatedAt}}</td>
<td>{{if .OperatorName}}{{.OperatorName}}{{else}}系统{{end}}</td>
<td><span class="chip chip-plain">{{.Action}}</span></td>
<td class="small muted">{{if .Entity}}{{.Entity}}{{if .EntityID}} #{{.EntityID}}{{end}}{{else}}—{{end}}</td>
<td class="small">{{.Summary}}</td>
<td class="mono small muted">{{.IP}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{template "pager" .D.Pager}}
{{else}}
<div class="empty"><div class="empty-mark">票</div><p>没有符合条件的日志。</p></div>
{{end}}
</div>
{{end}}