Organize contest list into timeline tabs

This commit is contained in:
anhkha2003 2024-05-24 19:35:06 -05:00
parent 6c8926ec56
commit c212f974c5
9 changed files with 496 additions and 392 deletions

View file

@ -434,14 +434,12 @@ class OrganizationContests(
args=[self.organization.id, self.organization.slug],
)
for participation in context["active_participations"]:
self.set_editable_contest(participation.contest)
for contest in context["past_contests"]:
self.set_editable_contest(contest)
for contest in context["current_contests"]:
self.set_editable_contest(contest)
for contest in context["future_contests"]:
self.set_editable_contest(contest)
if self.current_tab == "active":
for participation in context["contests"]:
self.set_editable_contest(participation.contest)
else:
for contest in context["contests"]:
self.set_editable_contest(contest)
return context