1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{{define "content" -}}
<h2><a href="/~{{.Repo.OwnerName}}/{{.Repo.Name}}">~{{.Repo.OwnerName}}/{{.Repo.Name}}</a> · log</h2>
<form method="GET" class="form-inline">
<label for="branch" class="mr-2">Branch</label>
<select class="form-control mr-2" name="branch" id="branch" onchange="this.form.submit()">
{{range .Branches}}
<option value="{{.Name}}" {{if eq .Name $.Branch}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<noscript><button type="submit" class="btn btn-secondary">Go</button></noscript>
</form>
{{if .Commits}}
<table class="table">
<thead>
<tr><th>Commit</th><th>Message</th><th>Author</th><th>Date</th></tr>
</thead>
<tbody>
{{range .Commits}}
<tr>
<td>
<a href="/~{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.Hash}}">
<code>{{.Hash | shortsha}}</code>
</a>
</td>
<td>{{.Message}}</td>
<td class="text-muted">{{.Author}}</td>
<td class="text-muted" title="{{.Date | abstime}}">{{.Date | reltime}}</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<p class="text-muted">No commits on this branch.</p>
{{end}}
{{if .NextHash}}
<a class="btn btn-secondary"
href="/~{{.Repo.OwnerName}}/{{.Repo.Name}}/log?branch={{.Branch | urlquery}}&from={{.NextHash | urlquery}}">
Older commits →
</a>
{{end}}
{{- end}}