internal/web/templates/issues.html

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

25 lines · 1656 bytes

 1{{define "title"}}issues · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 2{{define "content"}}
 3<div class="listhead">
 4  <h1>Issues</h1>
 5  <nav class="filters">
 6    <a {{if eq .State "open"}}class="active" {{end}}href="?state=open">open</a>
 7    <a {{if eq .State "closed"}}class="active" {{end}}href="?state=closed">closed</a>
 8    <a {{if eq .State "all"}}class="active" {{end}}href="?state=all">all</a>
 9  </nav>
10  {{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}}
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}}<a class="chip label" style="{{index $.LabelColors .}}" href="?label={{.}}">{{.}}</a> {{end}}</p>
19    <p class="meta">#{{.Number}} opened by <a href="/{{.Author}}">{{.Author}}</a>{{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}}