internal/web/templates/issues.html

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

26 lines · 1628 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  {{if .Label}}<p class="meta">label: <span class="chip label" style="{{index .LabelColors .Label}}">{{.Label}}</span> <a href="?state={{.State}}">clear</a></p>{{end}}
12  <span class="spacer"></span>
13  <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>
14</div>
15<ul class="issuelist">
16{{range .Issues}}<li>
17  <div class="issuemain">
18    <p class="title"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/issues/{{.Number}}">{{.Title}}</a>
19    {{range .Labels}}<a class="chip label" style="{{index $.LabelColors .}}" href="?label={{.}}">{{.}}</a> {{end}}</p>
20    <p class="meta">#{{.Number}} opened by <a href="/{{.Author}}">{{.Author}}</a>{{if .Milestone}} · <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/milestones">{{.Milestone}}</a>{{end}}</p>
21  </div>
22  <span class="chip {{if eq .State "open"}}chip-open{{else}}chip-done{{end}}">{{.State}}</span>
23</li>
24{{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}}
25</ul>
26{{end}}