internal/web/templates/issues.html
25 lines · 1419 bytes
1{{define "title"}}issues · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
2{{define "content"}}
3{{template "repoheader" .}}
4<div class="listhead">
5 <h2>issues</h2>
6 <nav class="filters">
7 <a {{if eq .State "open"}}class="active" {{end}}href="?state=open">open</a>
8 <a {{if eq .State "closed"}}class="active" {{end}}href="?state=closed">closed</a>
9 <a {{if eq .State "all"}}class="active" {{end}}href="?state=all">all</a>
10 </nav>
11 <span class="spacer"></span>
12 <p class="meta"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/milestones">milestones</a>{{if .Viewer}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/new">new issue</a>{{end}}</p>
13</div>
14<ul class="issuelist">
15{{range .Issues}}<li>
16 <div class="issuemain">
17 <p class="title"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/issues/{{.Number}}">{{.Title}}</a>
18 {{range .Labels}}<span class="chip label" style="{{index $.LabelColors .}}">{{.}}</span> {{end}}</p>
19 <p class="meta">#{{.Number}} opened by {{.Author}}{{if .Milestone}} · <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/milestones">{{.Milestone}}</a>{{end}}</p>
20 </div>
21 <span class="chip {{if eq .State "open"}}chip-open{{else}}chip-done{{end}}">{{.State}}</span>
22</li>
23{{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}}
24</ul>
25{{end}}