1{{ define "title" }}{{.Repo}} — issue {{.ID}}{{ end }}
2{{ define "navextra" }}<a href="/{{.Repo}}">{{.Repo}}</a> <a href="/{{.Repo}}/log">log</a> <a href="/{{.Repo}}/tree">tree</a> <a href="/{{.Repo}}/issues">issues</a> <a href="/{{.Repo}}/stacks">stacks</a> <a href="/{{.Repo}}/wiki">wiki</a>{{ end }}
3{{ define "srv_repo_issue.html" }}{{ template "head" . }}
4<div class="container">
5 <div style="margin-bottom: 8px">
6 <a href="/{{.Repo}}/issues" style="font-size: 13px; color: #666">← issues</a>
7 </div>
8 <h1 class="repo-name" style="margin-bottom: 6px">{{.Title}}</h1>
9 <div class="repo-meta"
10 style="display: flex;
11 align-items: center;
12 gap: 10px;
13 margin-bottom: 16px">
14 <span>
15 {{ if eq .Status "open" }}
16 <span class="badge badge-public">open</span>
17 {{ else if eq .Status "closed" }}
18 <span class="badge badge-private">closed</span>
19 {{ else }}
20 <span class="badge badge-secret">{{.Status}}</span>
21 {{ end }}
22 </span>
23 <span style="color: #888">{{.ID}}</span>
24 {{ if .Labels }} {{ range .Labels }}<span class="bookmark-tag">{{.}}</span>{{ end }} {{ end }} {{ if .User }}
25 <form method="post" action="/{{.Repo}}/issue/status" style="margin: 0">
26 <input type="hidden" name="issue_id" value="{{.ID}}" />
27 {{ if eq .Status "open" }}
28 <input type="hidden" name="status" value="closed" />
29 <button type="submit"
30 style="background: #c0392b;
31 font-size: 12px;
32 padding: 2px 10px">Close</button>
33 {{ else }}
34 <input type="hidden" name="status" value="open" />
35 <button type="submit"
36 style="background: #27ae60;
37 font-size: 12px;
38 padding: 2px 10px">Reopen</button>
39 {{ end }}
40 </form>
41 {{ end }}
42 </div>
43 {{ if .Body }}
44 <div style="background: #f8f8f8;
45 border: 1px solid #ddd;
46 border-radius: 3px;
47 padding: 12px 16px;
48 margin-bottom: 24px;
49 white-space: pre-wrap;
50 font-size: 13px;
51 line-height: 1.5">{{.Body}}</div>
52 {{ end }} {{ if .Comments }}
53 <h3 style="font-size: 14px; color: #555; margin-bottom: 10px">Comments</h3>
54 {{ range .Comments }}
55 <div style="border: 1px solid #e0e0e0;
56 border-radius: 3px;
57 margin-bottom: 12px">
58 <div style="background: #f4f4f4;
59 padding: 6px 12px;
60 font-size: 12px;
61 color: #555;
62 border-bottom: 1px solid #e0e0e0">
63 <strong>{{.Author}}</strong>
64 </div>
65 <div style="padding: 10px 12px;
66 white-space: pre-wrap;
67 font-size: 13px;
68 line-height: 1.5">{{.Text}}</div>
69 </div>
70 {{ end }} {{ end }} {{ if .User }}
71 <h3 style="font-size: 14px;
72 color: #555;
73 margin-bottom: 10px;
74 margin-top: 24px">Add comment</h3>
75 <form method="post" action="/{{.Repo}}/issue/comment">
76 <input type="hidden" name="issue_id" value="{{.ID}}" />
77 <div class="field">
78 <textarea name="text"
79 rows="4"
80 required
81 style="width: 500px;
82 padding: 6px 8px;
83 border: 1px solid #ccc;
84 border-radius: 3px;
85 font-family: monospace;
86 font-size: 13px"
87 placeholder="Leave a comment…"></textarea>
88 </div>
89 <button type="submit">Comment</button>
90 </form>
91 {{ end }}
92</div>
93{{ template "foot" . }}
94{{ end }}