gitcat
1{{define "content"}}
2{{template "adminnav" (dict "Tab" "repos")}}
3<div class="pagehead">
4 <h1>项目管理</h1>
5 <p class="muted">可以编辑描述、归档、转移归属或彻底删除仓库。</p>
6</div>
7
8<div class="card">
9 <div class="list-head">
10 <form class="inline-search" method="get" action="/admin/repos">
11 <input type="search" name="q" value="{{if .Data.Query}}{{.Data.Query}}{{end}}" placeholder="搜索项目名或描述…">
12 <button class="btn btn-mini" type="submit">搜索</button>
13 </form>
14 <span class="muted">共 {{len .Data.Rows}} 个项目</span>
15 </div>
16 <div class="table-wrap">
17 <table class="datatable">
18 <thead><tr><th>项目</th><th>归属</th><th>提交/推送</th><th>体积</th><th>最近更新</th><th>状态</th><th></th></tr></thead>
19 <tbody>
20 {{range .Data.Rows}}
21 <tr>
22 <td>
23 <a class="quiet repo-name-cell" href="/{{.Card.Name}}">{{.Card.Name}}</a>
24 {{if .Card.Description}}<div class="muted small">{{.Card.Description}}</div>{{end}}
25 </td>
26 <td class="muted small">{{if .Card.OwnerName}}@{{.Card.OwnerName}}{{else}}—{{end}}</td>
27 <td class="muted small">{{.Card.PushCount}} 次推送</td>
28 <td class="muted small">{{.Size}}</td>
29 <td class="muted small">{{timeago .Card.UpdatedAt}}</td>
30 <td>
31 {{if .Card.IsArchived}}<span class="tag tag-warn">已归档</span>{{else}}<span class="tag tag-ok">活跃</span>{{end}}
32 {{if not .Card.AIEnabled}}<span class="tag tag-plain">AI 关</span>{{end}}
33 </td>
34 <td class="cell-actions"><a class="btn btn-mini" href="/admin/repos/{{.Card.ID}}">管理</a></td>
35 </tr>
36 {{end}}
37 </tbody>
38 </table>
39 </div>
40</div>
41{{end}}