Add submission ajax to other contest formats
This commit is contained in:
parent
81d6a57b26
commit
0f0dd502c2
4 changed files with 8 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue