From dc503a014c952f7b72ab65ae634e48322a5fa578 Mon Sep 17 00:00:00 2001 From: Amit Upreti Date: Wed, 8 Mar 2023 11:55:38 -0500 Subject: [PATCH] display data for the inactive participants --- .../templates/events/event_entries.html | 30 +++++++++++++++++-- .../templatetags/participation_status.py | 10 +++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/physionet-django/events/templates/events/event_entries.html b/physionet-django/events/templates/events/event_entries.html index 7658bbe27f..6b49590669 100644 --- a/physionet-django/events/templates/events/event_entries.html +++ b/physionet-django/events/templates/events/event_entries.html @@ -1,7 +1,8 @@ +{% load participation_status %} -
+
+ + + + + + + + + + + + {% with inactive_applications=event|get_inactive_applications %} + {% for application in inactive_applications %} + + + + + + + + {% endfor %} + {% endwith %} + +
UsernameFull nameEmailReasonDate
{{ application.user.username }}{{ application.user.get_full_name }}{{ application.user.email }}{{ application.comment_to_applicant }}{{ application.decision_datetime | date }}
+
diff --git a/physionet-django/events/templatetags/participation_status.py b/physionet-django/events/templatetags/participation_status.py index 28952bf64d..0c954bde2b 100644 --- a/physionet-django/events/templatetags/participation_status.py +++ b/physionet-django/events/templatetags/participation_status.py @@ -22,3 +22,13 @@ def is_on_waiting_list(user, event): @register.filter(name='has_access_to_event_dataset') def has_access_to_event_dataset(user, dataset): return dataset.has_access(user) + + +@register.filter(name='get_inactive_applications') +def get_inactive_applications(event): + return event.applications.filter( + status__in=[ + EventApplication.EventApplicationStatus.NOT_APPROVED, + EventApplication.EventApplicationStatus.WITHDRAWN + ] + )