Organize contest list into timeline tabs (#111)

This commit is contained in:
Phuoc Anh Kha Le 2024-05-25 13:27:20 -05:00 committed by GitHub
parent 6c8926ec56
commit 9f4ae9f78f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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