internal/web/templates/refs.html

545ba0bcdea3b534903bd78c918c0c025a97eda7
gitbay/internal/web/templates/refs.html

29 lines · 2092 bytes

 1{{define "title"}}refs · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 2{{define "content"}}
 3<div class="pagehead">
 4  <h1>Refs</h1>
 5</div>
 6<section class="setcard">
 7<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/compare" class="compareform">
 8  <label>Compare <input name="base" value="{{.Repo.DefaultBranch}}" size="14" aria-label="Compare base ref" autocomplete="off" spellcheck="false"></label>
 9  <label>with <input name="head" size="14" placeholder="branch, tag or sha" aria-label="with head ref" autocomplete="off" spellcheck="false"></label>
10  <button type="submit" class="btn">Compare</button>
11</form>
12</section>
13<section class="setcard">
14<div class="pagehead">
15  <h2>Branches <span class="chip">{{len .Branches}}</span></h2>
16  <span class="grow"></span>
17  {{if .Branches}}<input type="search" class="tablefilter" placeholder="Filter branches…" aria-label="Filter branches" data-filter-table="refs-branches">{{end}}
18</div>
19<div class="tablewrap"><table class="refs" id="refs-branches"><thead><tr><th scope="col">Branch</th><th scope="col">Commit</th></tr></thead><tbody>{{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" colspan="2">none</td></tr>{{end}}</tbody></table></div>
20</section>
21<section class="setcard">
22<div class="pagehead">
23  <h2>Tags <span class="chip">{{len .Tags}}</span></h2>
24  <span class="grow"></span>
25  {{if .Tags}}<input type="search" class="tablefilter" placeholder="Filter tags…" aria-label="Filter tags" data-filter-table="refs-tags">{{end}}
26</div>
27<div class="tablewrap"><table class="refs" id="refs-tags"><thead><tr><th scope="col">Tag</th><th scope="col">Commit</th></tr></thead><tbody>{{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" colspan="2">none</td></tr>{{end}}</tbody></table></div>
28</section>
29{{end}}