internal/web/templates/log.html
27 lines · 1691 bytes
1{{define "width"}}wide{{end}}
2{{define "title"}}log · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3{{define "content"}}
4<h1 class="vh">Commits</h1>
5<form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">
6 <label for="path">Path</label>
7 <input type="text" id="path" name="path" value="{{.FilePath}}" placeholder="filter to a file or directory">
8 <button type="submit" class="btn">Filter</button>
9 {{if .FilePath}}<a class="act" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}}
10</form>
11{{if .FilePath}}<p class="meta">history of <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.FilePath}}"><code>{{.FilePath}}</code></a></p>{{end}}
12<ul class="loglist">
13{{range .Commits}}{{$c := .}}<li>
14 <div class="commitmain">
15 <p class="subject"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.SHA}}">{{.Subject}}</a></p>
16 <p class="meta">{{template "authorname" dict "Name" .AuthorName "User" .AuthorUser "Email" .AuthorEmail}} · {{when .Date}}</p>
17 </div>
18 <div class="commitside">
19 {{with .Check}}<a class="badge badge-{{.}}" href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{$c.SHA}}" title="checks: {{.}}">{{.}}</a>{{end}}
20 {{template "sigbadge" .Sig}}
21 <code><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.SHA}}">{{.ShortSHA}}</a></code>
22 </div>
23</li>
24{{else}}<li class="empty">{{if .FilePath}}nothing touches <code>{{.FilePath}}</code> on {{.Ref}}{{else}}no commits on {{.Ref}} yet{{end}}</li>{{end}}
25</ul>
26{{if .NextSHA}}<p class="pager"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.NextSHA}}{{if .FilePath}}?path={{.FilePath}}{{end}}">older →</a></p>{{end}}
27{{end}}