internal/web/templates/refs.html

a869e55cedfc2d279bbaba2e2a0a02eb1114d9b7
gitbay/internal/web/templates/refs.html history · blame · raw

13 lines · 1198 bytes

 1{{define "title"}}refs · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 2{{define "content"}}
 3<h1>Refs</h1>
 4<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/compare" class="compareform">
 5  <label>Compare <input name="base" value="{{.Repo.DefaultBranch}}" size="14" aria-label="base ref"></label>
 6  <label>with <input name="head" size="14" placeholder="branch, tag or sha" aria-label="head ref"></label>
 7  <button type="submit" class="btn">Compare</button>
 8</form>
 9<h2>Branches</h2>
10<table class="refs"><thead><tr><th scope="col">Branch</th><th scope="col">Commit</th></tr></thead>{{range .Branches}}<tr><td class="name">{{template "branchicon"}} <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
11<h2>Tags</h2>
12<table class="refs"><thead><tr><th scope="col">Tag</th><th scope="col">Commit</th></tr></thead>{{range .Tags}}<tr><td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
13{{end}}