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 ""
|
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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue