aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/templates/answer_list.html.twig
diff options
context:
space:
mode:
Diffstat (limited to 'services/app/templates/answer_list.html.twig')
-rw-r--r--services/app/templates/answer_list.html.twig45
1 files changed, 45 insertions, 0 deletions
diff --git a/services/app/templates/answer_list.html.twig b/services/app/templates/answer_list.html.twig
new file mode 100644
index 0000000..410ab20
--- /dev/null
+++ b/services/app/templates/answer_list.html.twig
@@ -0,0 +1,45 @@
+{% extends '_page.html.twig' %}
+
+{% block content %}
+ <h2>{{ quiz.title }}</h2>
+ <p>
+ {{ quiz.description }}
+ </p>
+ <h2>回答一覧</h2>
+ {% if answers|length == 0 %}
+ <p>
+ まだ回答がありません
+ </p>
+ {% else %}
+ <table>
+ <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 %}