arche / internal/archesrv/templates/srv_repo_commit.html

commit 154431fd
 1{{ define "title" }}{{.Repo}} — commit {{.ShortHex}}{{ 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_commit.html" }}{{ template "head" . }}
 4<div class="container">
 5    <h1 class="repo-name">{{.Repo}} / commit</h1>
 6    <table style="width: auto; margin-bottom: 16px">
 7        <tr>
 8            <th style="width: 90px">commit</th>
 9            <td>
10                <code>{{.HexID}}</code>
11            </td>
12        </tr>
13        <tr>
14            <th>change</th>
15            <td>
16                <code>{{.ChangeID}}</code>
17            </td>
18        </tr>
19        <tr>
20            <th>author</th>
21            <td>{{.Author}}</td>
22        </tr>
23        <tr>
24            <th>committer</th>
25            <td>{{.Committer}}</td>
26        </tr>
27        <tr>
28            <th>date</th>
29            <td>{{.Date}}</td>
30        </tr>
31        <tr>
32            <th>phase</th>
33            <td>
34                <span class="badge badge-{{.PhaseClass}}">{{.Phase}}</span>
35            </td>
36        </tr>
37        {{ if .Bookmarks }}
38        <tr>
39            <th>bookmarks</th>
40            <td>
41                {{ range .Bookmarks }}<span class="bookmark-tag">{{.}}</span> {{ end }}
42            </td>
43        </tr>
44        {{ end }} {{ if .Parents }}
45        <tr>
46            <th>parents</th>
47            <td>
48                {{ range .Parents }}<a href="/{{$.Repo}}/commit?id={{.HexID}}"><code>{{.ShortHex}}</code></a>
49                {{ end }}
50            </td>
51        </tr>
52        {{ end }}
53        <tr>
54            <th>signature</th>
55            <td>
56                {{ if eq .SigStatus "verified" }}
57                <span class="badge badge-public" title="Signed by a registered key">&#10003; Verified</span>
58                {{ else if eq .SigStatus "unknown_key" }}
59                <span class="badge badge-draft"
60                      title="Signature present but key not registered">Signed (unknown key)</span>
61                {{ else if eq .SigStatus "invalid" }}
62                <span class="badge"
63                      style="background:#cc0000;
64                             color:#fff"
65                      title="Signature verification failed">&#x26A0; Invalid signature</span>
66            {{ else }}
67                <span style="color:#888">Unsigned</span>
68                {{ end }}
69            </td>
70        </tr>
71    </table>
72    <pre style="background: #f9f9f9; border: 1px solid #ddd; padding: 10px; border-radius: 3px; white-space: pre-wrap; margin-bottom: 16px;">
73{{.Message}}</pre>
74    {{ range .Diffs }}
75    <div style="margin-bottom: 12px">
76        <div style="font-size: 13px; padding: 4px 0; color: #333">
77            <strong>{{.Path}}</strong>
78            <span style="color: #888; font-size: 12px; margin-left: 6px">[{{.Status}}]</span>
79        </div>
80        <div class="diff-block">
81            <pre>{{range .Lines}}<span class="{{.Class}}">{{.Text}}
82</span>{{end}}</pre>
83        </div>
84    </div>
85    {{ end }}
86</div>
87{{ template "foot" . }}
88{{ end }}