diff options
| author | Lena <lena@omega> | 2026-08-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-08-01 00:00:00 +0000 |
| commit | bb6bc2387d58c737dbf92e73f8544bf39319dbd8 (patch) | |
| tree | 6d5eaf5dac213074cd832da50f64260fce728fed /templates/issue.html | |
| download | git-forge-master.tar.gz | |
A small self-hosted git forge: HTTP push and pull, cgit browsing,
local and OIDC accounts, TOTP, scoped push tokens, per-repo
permissions, issues, a wiki, and outbound mail.
It does not reimplement git. git-http-backend and cgit run as CGI
behind its own listener, which authorises every request before
exec'ing either. One binary, one data directory, one listener: no
database, no JavaScript, and state is JSON in a git repo with a
working tree.
Diffstat (limited to 'templates/issue.html')
| -rw-r--r-- | templates/issue.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/templates/issue.html b/templates/issue.html new file mode 100644 index 0000000..e5135a0 --- /dev/null +++ b/templates/issue.html @@ -0,0 +1,62 @@ +{{define "title"}}{{.Data.Issue.Title}} - {{.Data.Path}} - {{.Site}}{{end}} +{{define "main"}} +{{$issue := .Data.Issue}} +<h2>{{$issue.Title}} <span class="dim">#{{$issue.ID}}</span></h2> +<p> +<span class="state-{{$issue.State}}">{{$issue.State}}</span> +<span class="dim">opened by</span> {{template "who" $issue.Author}} +<span class="dim">on {{$issue.Created.Format "2006-01-02 15:04"}} UTC</span> +{{range $issue.Labels}}<span class="label">{{.}}</span>{{end}} +</p> + +{{if .Data.Triage}} +<div class="bar"> +<form method="post" action="/{{.Data.Path}}/issues/{{$issue.ID}}/state"> +<input type="hidden" name="csrf" value="{{.CSRF}}"> +<button type="submit">{{if eq $issue.State "open"}}close this issue{{else}}reopen this issue{{end}}</button> +</form> +{{with .Data.Labels}} +<form method="post" action="/{{$.Data.Path}}/issues/{{$issue.ID}}/labels"> +<input type="hidden" name="csrf" value="{{$.CSRF}}"> +{{range .}} +<label class="inline" for="label-{{.Name}}"> +<input id="label-{{.Name}}" type="checkbox" name="label" value="{{.Name}}" {{if .On}}checked{{end}}> +{{.Name}} +</label> +{{end}} +<button type="submit">set labels</button> +</form> +{{end}} +</div> +{{end}} + +<div class="comment"> +<div class="byline">{{template "who" $issue.Author}} <span class="dim">opened this</span></div> +<article>{{.Data.Rendered}}</article> +</div> + +{{range .Data.Comments}} +<div class="comment"> +<div class="byline"> +{{template "who" .Comment.Author}} +<span class="dim">commented on {{.Comment.Created.Format "2006-01-02 15:04"}} UTC</span> +</div> +<article>{{.Rendered}}</article> +</div> +{{end}} + +{{if .Data.Can}} +<h3>Comment</h3> +<form method="post" action="/{{.Data.Path}}/issues/{{$issue.ID}}/comment"> +<input type="hidden" name="csrf" value="{{.CSRF}}"> +<p> +<label for="body"> +Markdown: **bold**, `code`, a list, or four spaces for a code block. Raw HTML +is not rendered. +</label> +<textarea id="body" name="body" rows="8" required></textarea> +</p> +<p><button type="submit">Comment</button></p> +</form> +{{end}} +{{end}} |