diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-06 21:37:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-06 21:37:56 +0900 |
| commit | c19c84cd11380901c3f8ea60fa0319cca8d7b7d3 (patch) | |
| tree | b5f804c9e2dca05d098c6c2714febd8e6ec5bfb3 /services/app/templates/quiz_view.html.twig | |
| parent | 050b65de6ba50784c32ecf0432ddfd6a80b17311 (diff) | |
| download | phperkaigi-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/quiz_view.html.twig')
| -rw-r--r-- | services/app/templates/quiz_view.html.twig | 8 |
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> |
