Add new ui for active-contest
This commit is contained in:
parent
79e86c7a4a
commit
e6fb05a6c8
1 changed files with 39 additions and 39 deletions
|
@ -233,25 +233,18 @@
|
||||||
{{ _('Active Contests') }}
|
{{ _('Active Contests') }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="toggled">
|
<div class="toggled">
|
||||||
<table class="contest-list table striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width:90%">{{ _('Contest') }}</th>
|
|
||||||
<th>{{ _('Users') }}</th>
|
|
||||||
{% if not request.in_contest %}
|
|
||||||
<th style="width:15%"></th>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for participation in active_participations %}
|
{% for participation in active_participations %}
|
||||||
{% with contest=participation.contest %}
|
{% with contest=participation.contest %}
|
||||||
<tr>
|
<div class="list-contest">
|
||||||
<td>
|
<div class="info-contest" style="flex: 1.5">
|
||||||
<div class="contest-block">
|
<div class="contest-title">Kì thi:</div>
|
||||||
{{ contest_head(contest) }}
|
{{ contest_head(contest) }}
|
||||||
|
</div>
|
||||||
|
<div class="info-contest" style="flex: 1.5">
|
||||||
|
<div class="contest-title">Thời gian:</div>
|
||||||
|
<div class="contest-block">
|
||||||
{% if contest.start_time %}
|
{% if contest.start_time %}
|
||||||
<br>
|
|
||||||
{% if contest.time_limit %}
|
{% if contest.time_limit %}
|
||||||
<span class="time">
|
<span class="time">
|
||||||
{% trans countdown=participation.end_time|as_countdown %}Window ends in {{countdown}}{% endtrans %}
|
{% trans countdown=participation.end_time|as_countdown %}Window ends in {{countdown}}{% endtrans %}
|
||||||
|
@ -262,16 +255,23 @@
|
||||||
{{ time_left(contest) }}
|
{{ time_left(contest) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</div>
|
||||||
<td>
|
<div class="info-contest">
|
||||||
|
<div class="contest-title">Định dạng:</div>
|
||||||
|
{% if contest.format_name == "default" %} IOI
|
||||||
|
{% else %} {{ contest.format_name|upper }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="info-contest">
|
||||||
|
<div class="contest-title">Người tham gia:</div>
|
||||||
{{ user_count(contest, request.user) }}
|
{{ user_count(contest, request.user) }}
|
||||||
</td>
|
</div>
|
||||||
|
<div class="participate-button">
|
||||||
{{ contest_join(contest, request) }}
|
{{ contest_join(contest, request) }}
|
||||||
</tr>
|
</div>
|
||||||
|
</div>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue