From 64aa2974ee87af32e6d6fcd7e78ad70c985388cd Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 28 Apr 2026 21:34:46 +0100 Subject: [PATCH] feat: Add admin edit links for superusers in case history view Co-authored-by: Copilot --- .../atlas/collection_history_user.html | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/atlas/templates/atlas/collection_history_user.html b/atlas/templates/atlas/collection_history_user.html index eee50459..8d9ad615 100644 --- a/atlas/templates/atlas/collection_history_user.html +++ b/atlas/templates/atlas/collection_history_user.html @@ -48,6 +48,21 @@ href="{% url 'atlas:collection_case_view' pk=collection.id case_number=forloop.counter0 %}"> Open Case + {% if request.user.is_superuser and row.user_answer %} + {% if row.user_answer.user_id %} + + Edit in admin + + {% else %} + + Edit in admin + + {% endif %} + {% endif %} {% if row.self_reviews %} {% for review in row.self_reviews %} - {% if row.user_answer.user_id %} - Edit in admin - {% else %} - Edit in admin - {% endif %} - - {% endif %} {% endif %}