internal/web/templates/issue.html

c327fbdf04d6735772a5d661b271d68fe9e39404
gitbay/internal/web/templates/issue.html history · blame · raw

26 lines · 1508 bytes

 1{{define "title"}}#{{.Issue.Number}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 2{{define "content"}}
 3{{template "repoheader" .}}
 4<h2 class="issuetitle">{{.Issue.Title}} <span class="issuenumber">#{{.Issue.Number}}</span></h2>
 5<p class="issuemeta"><span class="chip {{if eq .Issue.State "open"}}chip-open{{else}}chip-done{{end}}">{{.Issue.State}}</span>
 6{{.Issue.Author}} opened this on {{when .Issue.CreatedAt}}
 7{{if .Issue.Labels}} · {{range .Issue.Labels}}<span class="chip label" style="{{index $.LabelColors .}}">{{.}}</span> {{end}}{{end}}
 8{{if .Issue.Assignees}} · assigned to {{range .Issue.Assignees}}{{.}} {{end}}{{end}}
 9{{if .Issue.Milestone}} · milestone <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/milestones">{{.Issue.Milestone}}</a>{{end}}</p>
10{{if .BodyHTML}}<article class="comment">
11  <header class="commenthead"><strong>{{.Issue.Author}}</strong> <span class="when">{{when .Issue.CreatedAt}}</span></header>
12  <div class="rendered">{{.BodyHTML}}</div>
13</article>{{end}}
14{{range .Comments}}
15<article class="comment">
16  <header class="commenthead"><strong>{{.Author}}</strong> <span class="when">{{when .CreatedAt}}</span></header>
17  <div class="rendered">{{.BodyHTML}}</div>
18</article>
19{{end}}
20{{if .Viewer}}
21<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Issue.Number}}/comment" class="commentform">
22<p><textarea name="body" rows="4" placeholder="comment as {{.Viewer}}"></textarea></p>
23<p><button type="submit">comment</button></p>
24</form>
25{{end}}
26{{end}}