~gitpocket/gitpocket

4
4b5e48eebab4ce62f9be9b6ab232cb40a4f113b1
mainfeed-discovery
gitpocket/web/templates/log.tmpl -rw-r--r--1.9 KiB ViewLogBlameView rawPermalink f44e2cbd66 fix(web): fit every page to phone widths 6 hours ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{{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><span class="sha"><a class="hash" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{short .Hash}}</a>{{template "seal" .}}</span> <a class="subject" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{.Subject}}</a></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}}