Add toggle button

This commit is contained in:
cuom1999 2022-01-10 18:13:46 +07:00
parent 1f14ef7747
commit 39e3f2b1c2
15 changed files with 135 additions and 44 deletions

View file

@ -2,7 +2,7 @@
{% block js_media %}
<script type="text/javascript">
{% if dynamic_update and last_msg %}
{% if request.in_contest %}
{% if request.in_contest_mode %}
window.current_contest = '{{request.participation.contest.key}}';
{% else %}
window.current_contest = null;

View file

@ -24,7 +24,7 @@
<div>
{{ link_user(submission.user) }}
<span class="time">{{ relative_time(submission.date) }}</span>
{% if not request.in_contest and submission.contest_object_id %}
{% if not request.in_contest_mode and submission.contest_object_id %}
<a href="{{ url('contest_view', submission.contest_object.key) }}"
class="submission-contest">
<i title="{{ submission.contest_object.name }}" class="fa fa-dot-circle-o"></i>

View file

@ -32,7 +32,7 @@
<tr id="overall-row" class="case-row overall-result-{{submission.result}}">
<td><span class="col-title">{{_('Overall: ')}}</span>
{% if request.in_contest and submission.contest_or_none %}
{% if request.in_contest_mode and submission.contest_or_none %}
{% with contest=submission.contest_or_none %}
({{ _('%(points)s/%(total)s points', points=contest.points|roundfloat(3),
total=contest.problem.points|floatformat(-1)) }})