aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/templates/answer_list.html.twig
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-06 21:37:56 +0900
committernsfisis <nsfisis@gmail.com>2024-03-06 21:37:56 +0900
commitc19c84cd11380901c3f8ea60fa0319cca8d7b7d3 (patch)
treeb5f804c9e2dca05d098c6c2714febd8e6ec5bfb3 /services/app/templates/answer_list.html.twig
parent050b65de6ba50784c32ecf0432ddfd6a80b17311 (diff)
downloadphperkaigi-2024-albatross-c19c84cd11380901c3f8ea60fa0319cca8d7b7d3.tar.gz
phperkaigi-2024-albatross-c19c84cd11380901c3f8ea60fa0319cca8d7b7d3.tar.zst
phperkaigi-2024-albatross-c19c84cd11380901c3f8ea60fa0319cca8d7b7d3.zip
hide link to answer of other users
Diffstat (limited to 'services/app/templates/answer_list.html.twig')
-rw-r--r--services/app/templates/answer_list.html.twig8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/app/templates/answer_list.html.twig b/services/app/templates/answer_list.html.twig
index 03ab438..818a755 100644
--- a/services/app/templates/answer_list.html.twig
+++ b/services/app/templates/answer_list.html.twig
@@ -45,7 +45,13 @@
{{ loop.index }}
{% endif %}
</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>