internal/web/templates/issues.html

e9566eed86ebcd185c4b85f63d667b5e671fe787
gitbay/internal/web/templates/issues.html history · blame · raw

33 lines · 2095 bytes

 1{{define "width"}}wide{{end}}
 2{{define "title"}}issues · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<div class="withcol">
 5{{template "sidecol" .Facets}}
 6<div class="colmain">
 7<div class="listhead">
 8  <h1>Issues</h1>
 9  <form method="get" class="searchform compact">
10    <input type="search" name="q" aria-label="Search issues" value="{{.Query}}" placeholder="search title and body">
11    <button type="submit" class="btn">Search</button>
12    <input type="hidden" name="state" value="{{.State}}">
13  </form>
14  {{range .Filters}}<p class="meta">{{.Key}}: {{if eq .Key "label"}}<span class="chip label" style="{{index $.LabelColors .Value}}">{{.Value}}</span>{{else}}<b>{{.Value}}</b>{{end}} <a href="{{.Clear}}">clear</a></p>{{end}}
15  <span class="spacer"></span>
16  <p class="meta"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/milestones">milestones</a> · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/labels">labels</a>{{if .Viewer}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/new">new issue</a>{{end}}</p>
17</div>
18<ul class="issuelist rows">
19{{range .Issues}}<li>
20  <div class="issuemain">
21    <p class="title"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/issues/{{.Number}}">{{.Title}}</a>
22    {{range .Labels}}<a class="chip label" style="{{index $.LabelColors .}}" href="?label={{.}}">{{.}}</a> {{end}}</p>
23    <p class="meta">#{{.Number}} opened by <a href="/{{.Author}}">{{.Author}}</a>{{if .Milestone}} · in <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/milestones">{{.Milestone}}</a>{{end}}</p>
24  </div>
25  {{if eq $.State "all"}}<span class="chip {{if eq .State "open"}}chip-open{{else}}chip-done{{end}}">{{.State}}</span>{{end}}
26</li>
27{{else}}{{if .Query}}<li class="empty">no {{if ne .State "all"}}{{.State}} {{end}}issues matching “{{.Query}}”</li>
28{{else}}<li class="empty">no {{if ne .State "all"}}{{.State}} {{end}}issues — open one with <code>gitbay issue create {{.Repo.OwnerName}}/{{.Repo.Name}} --title "..."</code></li>{{end}}{{end}}
29</ul>
30{{if .Older}}<p class="pager"><a href="{{.Older}}">older →</a></p>{{end}}
31</div>
32</div>
33{{end}}