From 6b2ca1d2e159d40239c6fda7eefd0590f1b472c9 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 4 Apr 2021 13:30:02 +0200 Subject: [PATCH] Admin can see note details --- .../participation/passage_detail.html | 32 +++++++++++-------- apps/participation/views.py | 2 ++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/apps/participation/templates/participation/passage_detail.html b/apps/participation/templates/participation/passage_detail.html index 6a64cb5..de1287e 100644 --- a/apps/participation/templates/participation/passage_detail.html +++ b/apps/participation/templates/participation/passage_detail.html @@ -41,9 +41,11 @@ - {% if user.registration.is_admin %} + {% if notes is not None %} {% elif user.registration.participates %} @@ -98,16 +100,18 @@ {% endif %} - {% if user.registration.is_admin %} + {% if notes is not None %} {% trans "Update passage" as modal_title %} {% trans "Update" as modal_button %} {% url "participation:passage_update" pk=passage.pk as modal_action %} {% include "base_modal.html" with modal_id="updatePassage" %} - {% trans "Update notes" as modal_title %} - {% trans "Update" as modal_button %} - {% url "participation:update_notes" pk=my_note.pk as modal_action %} - {% include "base_modal.html" with modal_id="updateNotes" %} + {% if my_note is not None %} + {% trans "Update notes" as modal_title %} + {% trans "Update" as modal_button %} + {% url "participation:update_notes" pk=my_note.pk as modal_action %} + {% include "base_modal.html" with modal_id="updateNotes" %} + {% endif %} {% elif user.registration.participates %} {% trans "Upload synthesis" as modal_title %} {% trans "Upload" as modal_button %} @@ -119,18 +123,20 @@ {% block extrajavascript %}