1{{ define "title" }}{{.Repo}} — stack {{.StackID}}{{ end }}
2{{ define "navextra" }}<a href="/{{.Repo}}">{{.Repo}}</a> <a href="/{{.Repo}}/log">log</a> <a href="/{{.Repo}}/tree">tree</a> <a href="/{{.Repo}}/issues">issues</a> <a href="/{{.Repo}}/stacks">stacks</a> <a href="/{{.Repo}}/wiki">wiki</a>{{ end }}
3{{ define "srv_repo_stack.html" }}{{ template "head" . }}
4<div class="container">
5 <h2 class="repo-name">
6 {{.Repo}} / stack: <code>{{.StackID}}</code>
7 </h2>
8 <p>Showing {{ len .Entries }} change(s) in dependency order (oldest ancestor first).</p>
9 {{ range .Entries }}
10 <div class="commit-block"
11 id="{{.ChangeID}}"
12 style="border: 1px solid #333;
13 border-radius: 4px;
14 margin-bottom: 24px;
15 padding: 16px">
16 <div style="display: flex;
17 justify-content: space-between;
18 align-items: flex-start">
19 <div>
20 <code><a href="/{{$.Repo}}/commit/{{.HexID}}">{{.ShortHex}}</a></code>
21
22 <span class="phase-badge phase-{{.PhaseClass}}">{{.Phase}}</span>
23 {{ if .SigStatus }}
24 <span class="sig-badge">{{.SigStatus}}</span>
25 {{ end }}
26
27 <strong>{{.Message}}</strong>
28 </div>
29 <div style="font-size: 12px; color: #888;">{{.Author}} · {{.Date}}</div>
30 </div>
31 <div style="margin: 8px 0; font-size: 12px; color: #aaa;">
32 <code>ch:{{.ChangeID}}</code>
33 {{ if .DiffStats }}
34 · {{ .DiffStats }}
35 {{ end }}
36 </div>
37 <div style="margin-top: 12px;
38 display: flex;
39 align-content: center;
40 gap: 12px">
41 <strong style="font-size: 13px;">Review:
42 <span class="badge badge-{{ if eq .Review "approved" }}success{{ else if eq .Review "needs-revision" }}danger{{ else if eq .Review "reviewing" }}warning{{ else }}default{{ end }}">
43 {{.Review}}
44 </span>
45 </strong>
46 {{ if $.User }}
47 <form method="POST"
48 action="/{{$.Repo}}/stacks/{{$.StackID}}/reviews/{{.ChangeID}}"
49 style="display: inline-flex;
50 gap: 6px;
51 align-items: center">
52 <select name="status" style="font-size: 12px; padding: 2px 6px;">
53 <option value="open" {{ if eq .Review "open" }}selected{{ end }}>open
54 </option>
55 <option value="reviewing" {{ if eq .Review "reviewing" }}selected{{ end }}>reviewing
56 </option>
57 <option value="approved" {{ if eq .Review "approved" }}selected{{ end }}>approved
58 </option>
59 <option value="needs-revision"
60 {{ if eq .Review "needs-revision" }}
61 selected
62 {{ end }}>needs-revision
63 </option>
64 </select>
65 <button type="submit" style="font-size: 12px; padding: 2px 8px;">Update</button>
66 </form>
67 {{ end }}
68 </div>
69 {{ if .DiffStats }}
70 <details style="margin-top: 12px;">
71 <summary style="font-size: 12px; color: #888; cursor: pointer;">Show diff</summary>
72 <pre style="margin-top: 8px;
73 background: #1a1a1a;
74 padding: 12px;
75 border-radius: 4px;
76 font-size: 12px;
77 overflow-x: auto">{{.DiffStats}}</pre>
78 </details>
79 {{ end }}
80</div>
81{{ end }}
82</div>
83{{ template "foot" . }}
84{{ end }}