arche / internal/archesrv/templates/srv_repo_issues.html

commit 154431fd
 1{{ define "title" }}{{.Repo}} — issues{{ 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_issues.html" }}{{ template "head" . }}
 4<div class="container">
 5    <h1 class="repo-name">{{.Repo}} / issues</h1>
 6    {{ if .Issues }}
 7    <table style="margin-bottom: 24px">
 8        <thead>
 9            <tr>
10                <th>ID</th>
11                <th>Title</th>
12                <th>Status</th>
13            </tr>
14        </thead>
15        <tbody>
16            {{ range .Issues }}
17            <tr>
18                <td style="color: #aaa; font-size: 12px; min-width: 80px">
19                    <a href="/{{$.Repo}}/issue?id={{.ID}}">{{.ID}}</a>
20                </td>
21                <td>
22                    <a href="/{{$.Repo}}/issue?id={{.ID}}">{{.Title}}</a>
23                </td>
24                <td>
25                    {{ if eq .Status "open" }}
26                    <span class="badge badge-public">open</span>
27                    {{ else if eq .Status "closed" }}
28                    <span class="badge badge-private">closed</span>
29                {{ else }}
30                    <span class="badge badge-secret">{{.Status}}</span>
31                    {{ end }}
32                </td>
33            </tr>
34            {{ end }}
35        </tbody>
36    </table>
37{{ else }}
38    <p style="color: #888; margin-top: 12px; margin-bottom: 24px">No issues yet.</p>
39    {{ end }} {{ if .User }}
40    <details>
41        <summary style="cursor: pointer; font-size: 13px; color: #555">Create issue</summary>
42        <form method="post" action="/{{.Repo}}/issues" style="margin-top: 12px">
43            <div class="field">
44                <label>Title</label>
45                <input type="text" name="title" required style="width: 400px" />
46            </div>
47            <div class="field">
48                <label>Description</label>
49                <textarea name="body"
50                          rows="6"
51                          style="width: 400px;
52                                 padding: 6px 8px;
53                                 border: 1px solid #ccc;
54                                 border-radius: 3px;
55                                 font-family: monospace;
56                                 font-size: 13px"></textarea>
57            </div>
58            <button type="submit">Create issue</button>
59        </form>
60    </details>
61    {{ end }}
62</div>
63{{ template "foot" . }}
64{{ end }}