aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/templates/submissions.html
blob: b0368d7643a4a823a597c9b3144290314fad5181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{{ template "base.html" . }}

{{ define "breadcrumb" }}
<a href="{{ .BasePath }}admin/dashboard">Dashboard</a> |
<a href="{{ .BasePath }}admin/games">Games</a> |
<a href="{{ .BasePath }}admin/games/{{ .GameID }}">Game {{ .GameID }}</a>
{{ end }}

{{ define "content" }}
<h2>Submissions for Game {{ .GameID }}</h2>
<form method="POST" action="{{ .BasePath }}admin/games/{{ .GameID }}/submissions/rejudge-latest" style="display:inline">
  <button type="submit">Rejudge Latest</button>
</form>
<form method="POST" action="{{ .BasePath }}admin/games/{{ .GameID }}/submissions/rejudge-all" style="display:inline">
  <button type="submit">Rejudge All</button>
</form>
<table>
  <thead>
    <tr>
      <th>ID</th>
      <th>User</th>
      <th>Status</th>
      <th>Code Size</th>
      <th>Created At</th>
      <th>View</th>
    </tr>
  </thead>
  <tbody>
    {{ range .Submissions }}
      <tr>
        <td>{{ .SubmissionID }}</td>
        <td>{{ .Username }} (id={{ .UserID }})</td>
        <td>{{ .Status }}</td>
        <td>{{ .CodeSize }}</td>
        <td>{{ .CreatedAt }}</td>
        <td><a href="{{ $.BasePath }}admin/games/{{ $.GameID }}/submissions/{{ .SubmissionID }}">View</a></td>
      </tr>
    {{ end }}
  </tbody>
</table>
{{ end }}