blob: 03ab438a27b92e5c606cd2a2a6ef379f5a7597dd (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{% extends '_page.html.twig' %}
{% block content %}
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('quiz_list') }}">問題一覧</a></li>
<li class="breadcrumb-item"><a href="{{ url_for('quiz_view', { qslug: quiz.slug }) }}">{{ quiz.title }}</a></li>
<li class="breadcrumb-item active">回答一覧</li>
</ol>
</nav>
<h2>{{ quiz.title }}</h2>
<p>
{{ quiz.description }}
</p>
{% if is_open %}
<p>
<a class="btn btn-primary" href="{{ url_for('answer_new', { qslug: quiz.slug }) }}">回答する</a>
</p>
{% endif %}
<h2>回答一覧</h2>
{% if answers|length == 0 %}
<p>
まだ回答がありません
</p>
{% else %}
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>ランク</th>
<th>ID</th>
<th>作者</th>
<th>サイズ</th>
<th>投稿日時</th>
<th>ステータス</th>
</tr>
</thead>
<tbody>
{% for answer in answers %}
<tr>
<td>
{% if is_ranking_hidden %}
?
{% else %}
{{ loop.index }}
{% endif %}
</td>
<td><a href="{{ url_for('answer_view', { qslug: quiz.slug, anum: answer.answer_number }) }}">#{{ answer.answer_number }}</a></td>
<td>{{ answer.author_name }}{% if answer.author_is_admin %} (staff){% endif %}</td>
<td>{{ answer.code_size }} byte</td>
<td>{{ answer.submitted_at|date('Y-m-d H:i:s', 'Asia/Tokyo') }}</td>
<td>{{ answer.execution_status.label() }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
|