~gitpocket/gitpocket

1
ffe2b6d559e039a38853daa307cd8b7dbd0660be
mainfeed-discovery
gitpocket/templates/issue.html -rw-r--r--2.1 KiB ViewLogBlameView rawPermalink 3904633224 feat(basin): pr reviews, labels and branch protection 1 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{{define "content"}}
{{$p := .Data.Page}}
{{$i := .Data.Issue}}
<div class="pulltitle">
<h3 class="plain"><span class="state {{$i.State}}">{{$i.State}}</span> {{$i.Title}} <span class="muted">#{{$i.Number}}</span>{{range .Data.Labels}} <span class="label" style="background:{{.Colour}}">{{.Name}}</span>{{end}}</h3>
<p class="muted"><a href="/~{{$i.Author.Name}}">~{{$i.Author.Name}}</a> opened this issue {{ago $i.Created}}{{if .Data.Comments}} · {{len .Data.Comments}} comments{{end}}</p>
</div>
<div class="columns pullbody">
<div class="main">
<div class="comment"><div class="who"><a href="/~{{$i.Author.Name}}">~{{$i.Author.Name}}</a> <span class="muted">{{ago $i.Created}}</span></div><div class="readme">{{if $i.Body}}{{.Data.Body}}{{else}}<p class="muted">No description.</p>{{end}}</div></div>
{{range .Data.Comments}}<div class="comment"><div class="who"><a href="/~{{.Comment.Author.Name}}">~{{.Comment.Author.Name}}</a> <span class="muted">{{ago .Comment.Created}}</span></div><div class="readme">{{.Body}}</div></div>{{end}}
{{if and .User (not $p.Repo.Archived)}}<form method="post" action="/{{$p.Repo.Path}}/issues/{{$i.Number}}/comment" class="stack wide">
<label>Leave a comment <textarea name="body" rows="5" required placeholder="Markdown supported"></textarea></label>
<div class="actions"><button class="btn">Comment ▸</button></div>
</form>{{else if not .User}}<p class="muted"><a href="/login">Log in</a> to comment.</p>{{end}}
</div>
<aside><div class="panel">
{{if .Data.CanManage}}{{if eq $i.State "open"}}<form method="post" action="/{{$p.Repo.Path}}/issues/{{$i.Number}}/close"><button class="btn block">Close issue ▸</button></form>{{else}}<form method="post" action="/{{$p.Repo.Path}}/issues/{{$i.Number}}/reopen"><button class="btn block">Reopen ▸</button></form>{{end}}{{else}}<p class="muted small">Only the author and the repository owner can close this.</p>{{end}}
</div>
{{template "meta" (dict "Action" (printf "/%s/issues/%d/meta" $p.Repo.Path $i.Number) "Labels" .Data.Labels "AllLabels" .Data.AllLabels "Assignees" .Data.Assignees "Assignable" .Data.Assignable "Owner" $p.Owner)}}
</aside>
</div>
{{end}}