~gitpocket/gitpocket

gitpocket/templates/log.html -rw-r--r--2.1 KiB ViewLogBlameView rawPermalink 0f25c94d29 feat(web): pull request range-diff, pickaxe history search, reproducible tarballs and atom feeds 3 hours ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{{define "content"}}
{{$p := .Data.Page}}
{{if .Data.Path}}<p class="muted">History of <a href="/{{$p.Repo.Path}}/tree/{{$p.Ref}}/{{.Data.Path}}">{{.Data.Path}}</a> on {{$p.Ref}}</p>{{end}}
{{if $p.Empty}}<p class="muted">No commits.</p>{{else}}
<form method="get" class="pickaxe">{{if .Data.Path}}<input type="hidden" name="path" value="{{.Data.Path}}">{{end}}<input name="q" value="{{.Data.Query}}" placeholder="Find commits that added or removed some text"><select name="mode"><option value="text">changes its count</option><option value="regex"{{if eq .Data.Mode "regex"}} selected{{end}}>diff matches regex</option></select><button class="btn">Search history ▸</button></form>
{{with .Data.Error}}<p class="error">{{.}}</p>{{end}}{{if and .Data.Query (not .Data.Commits) (not .Data.Error)}}<p class="info">No commit on {{$p.Ref}} {{if eq .Data.Mode "regex"}}has a diff line matching{{else}}changes the number of occurrences of{{end}} <code>{{.Data.Query}}</code>.</p>{{end}}{{if and .Data.Query .Data.Commits}}<p class="muted">Commits on {{$p.Ref}} that {{if eq .Data.Mode "regex"}}touch lines matching{{else}}add or remove{{end}} <code>{{.Data.Query}}</code> · <a href="?{{if .Data.Path}}path={{.Data.Path}}{{end}}">clear</a></p>{{end}}
<div class="log">{{range .Data.Commits}}<div class="event"><div><a class="hash" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{short .Hash}}</a> <a class="subject" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{.Subject}}</a>{{template "badge" .}}</div><div class="muted small">{{template "who" .}} · <span title="{{date .Time}}">{{ago .Time}}</span></div>{{if .Body}}<pre class="body">{{.Body}}</pre>{{end}}</div>{{end}}</div>
{{with .Data.Next}}<p><a class="btn" href="?from={{.}}{{if $.Data.Path}}&path={{$.Data.Path}}{{end}}{{if $.Data.Query}}&q={{$.Data.Query}}&mode={{$.Data.Mode}}{{end}}">Older ▸</a></p>{{end}}
{{end}}
{{end}}
{{define "badge"}}{{with signer .}}<span class="verified" title="Signed with a key registered by ~{{.}}">Verified ~{{.}}</span>{{else}}{{if and .Signature (ne .Signature "N")}}<span class="verified unknown" title="Signed with an unregistered key">Unverified</span>{{end}}{{end}}{{end}}