Add submission ajax to other contest formats

This commit is contained in:
cuom1999 2022-06-04 21:29:51 -05:00
parent 81d6a57b26
commit 0f0dd502c2
4 changed files with 8 additions and 8 deletions

View file

@ -118,7 +118,7 @@ class AtCoderContestFormat(DefaultContestFormat):
else "" else ""
) )
return format_html( return format_html(
'<td class="{state} problem-score-col"><a href="{url}">{points}{penalty}<div class="solving-time">{time}</div></a></td>', '<td class="{state} problem-score-col"><a data-featherlight="{url}" href="#">{points}{penalty}<div class="solving-time">{time}</div></a></td>',
state=( state=(
( (
"pretest-" "pretest-"
@ -131,7 +131,7 @@ class AtCoderContestFormat(DefaultContestFormat):
) )
), ),
url=reverse( url=reverse(
"contest_user_submissions", "contest_user_submissions_ajax",
args=[ args=[
self.contest.key, self.contest.key,
participation.user.user.username, participation.user.user.username,

View file

@ -123,7 +123,7 @@ class ECOOContestFormat(DefaultContestFormat):
) )
return format_html( return format_html(
'<td class="{state}"><a href="{url}">{points}{bonus}<div class="solving-time">{time}</div></a></td>', '<td class="{state}"><a data-featherlight="{url}" href="#">{points}{bonus}<div class="solving-time">{time}</div></a></td>',
state=( state=(
( (
"pretest-" "pretest-"
@ -136,7 +136,7 @@ class ECOOContestFormat(DefaultContestFormat):
) )
), ),
url=reverse( url=reverse(
"contest_user_submissions", "contest_user_submissions_ajax",
args=[ args=[
self.contest.key, self.contest.key,
participation.user.user.username, participation.user.user.username,

View file

@ -120,7 +120,7 @@ class ICPCContestFormat(DefaultContestFormat):
else "" else ""
) )
return format_html( return format_html(
'<td class="{state}"><a href="{url}">{points}{penalty}<div class="solving-time">{time}</div></a></td>', '<td class="{state}"><a data-featherlight="{url}" href="#">{points}{penalty}<div class="solving-time">{time}</div></a></td>',
state=( state=(
( (
"pretest-" "pretest-"
@ -133,7 +133,7 @@ class ICPCContestFormat(DefaultContestFormat):
) )
), ),
url=reverse( url=reverse(
"contest_user_submissions", "contest_user_submissions_ajax",
args=[ args=[
self.contest.key, self.contest.key,
participation.user.user.username, participation.user.user.username,

View file

@ -88,7 +88,7 @@ class IOIContestFormat(DefaultContestFormat):
format_data = (participation.format_data or {}).get(str(contest_problem.id)) format_data = (participation.format_data or {}).get(str(contest_problem.id))
if format_data: if format_data:
return format_html( return format_html(
'<td class="{state} problem-score-col"><a href="{url}">{points}<div class="solving-time">{time}</div></a></td>', '<td class="{state} problem-score-col"><a data-featherlight="{url}" href="#">{points}<div class="solving-time">{time}</div></a></td>',
state=( state=(
( (
"pretest-" "pretest-"
@ -101,7 +101,7 @@ class IOIContestFormat(DefaultContestFormat):
) )
), ),
url=reverse( url=reverse(
"contest_user_submissions", "contest_user_submissions_ajax",
args=[ args=[
self.contest.key, self.contest.key,
participation.user.user.username, participation.user.user.username,