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 ""
)
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=(
(
"pretest-"
@ -131,7 +131,7 @@ class AtCoderContestFormat(DefaultContestFormat):
)
),
url=reverse(
"contest_user_submissions",
"contest_user_submissions_ajax",
args=[
self.contest.key,
participation.user.user.username,

View file

@ -123,7 +123,7 @@ class ECOOContestFormat(DefaultContestFormat):
)
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=(
(
"pretest-"
@ -136,7 +136,7 @@ class ECOOContestFormat(DefaultContestFormat):
)
),
url=reverse(
"contest_user_submissions",
"contest_user_submissions_ajax",
args=[
self.contest.key,
participation.user.user.username,

View file

@ -120,7 +120,7 @@ class ICPCContestFormat(DefaultContestFormat):
else ""
)
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=(
(
"pretest-"
@ -133,7 +133,7 @@ class ICPCContestFormat(DefaultContestFormat):
)
),
url=reverse(
"contest_user_submissions",
"contest_user_submissions_ajax",
args=[
self.contest.key,
participation.user.user.username,

View file

@ -88,7 +88,7 @@ class IOIContestFormat(DefaultContestFormat):
format_data = (participation.format_data or {}).get(str(contest_problem.id))
if format_data:
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=(
(
"pretest-"
@ -101,7 +101,7 @@ class IOIContestFormat(DefaultContestFormat):
)
),
url=reverse(
"contest_user_submissions",
"contest_user_submissions_ajax",
args=[
self.contest.key,
participation.user.user.username,