aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/templates/quiz_view.html.twig
diff options
context:
space:
mode:
Diffstat (limited to 'services/app/templates/quiz_view.html.twig')
-rw-r--r--services/app/templates/quiz_view.html.twig8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/app/templates/quiz_view.html.twig b/services/app/templates/quiz_view.html.twig
index ade324a..44676e2 100644
--- a/services/app/templates/quiz_view.html.twig
+++ b/services/app/templates/quiz_view.html.twig
@@ -41,7 +41,13 @@
{% for answer in ranking %}
<tr>
<td>{{ loop.index }}</td>
- <td><a href="{{ url_for('answer_view', { qslug: quiz.slug, anum: answer.answer_number }) }}">#{{ answer.answer_number }}</a></td>
+ <td>
+ {% if quiz.isOpenToAnswer() and answer.author_id != current_user_id %}
+ #{{ answer.answer_number }}
+ {% else %}
+ <a href="{{ url_for('answer_view', { qslug: quiz.slug, anum: answer.answer_number }) }}">#{{ answer.answer_number }}</a>
+ {% endif %}
+ </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>