From 780ef532345c4d7eaf7a1b37f81a6ebe39d97ba6 Mon Sep 17 00:00:00 2001 From: Anish Reddy Ravula <2anishreddy@gmail.com> Date: Wed, 6 Mar 2024 10:56:06 -0600 Subject: [PATCH] Clean up membership page - member table Show gear icon only if the user logged in has manager access level or show the gear icon for the user itself - so they can remove themselves from the project Show role drop down only if the logged in user has manager access level Added edit column name for the gear icon column --- projects/templates/projects/view_project.html | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/projects/templates/projects/view_project.html b/projects/templates/projects/view_project.html index 5b045b8e..4bdfb4c0 100644 --- a/projects/templates/projects/view_project.html +++ b/projects/templates/projects/view_project.html @@ -157,6 +157,7 @@

Project Members

Last Name Email Role + Edit {% for join_request in join_requests %} @@ -193,39 +194,41 @@

Project Members

{{ u.first_name }} {{ u.last_name }} {{ u.email }} + {% if can_manage_project_membership %} + +
+ {% csrf_token %} + + + + +
+ + {% else %} + {{u.role}} + {% endif %} -
- {% csrf_token %} - - - - -
- - - {% if u.username != request.user.username %} + {% if u.username == request.user.username or can_manage_project_membership %} - {% endif %} + {% endif %} {% if u.daypass %} Daypass: {{ u.daypass }} remain {% endif %}