NDOJ/templates/contest/contest.html

77 lines
2.9 KiB
HTML
Raw Normal View History

2022-11-27 07:03:38 +00:00
{% extends "two-column-content.html" %}
{% set page_type = 'detail' %}
{% block left_sidebar %}
2020-01-21 06:35:58 +00:00
{% set title = contest.name %}
{% include "contest/contest-tabs.html" %}
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block two_col_js %}
2020-01-21 06:35:58 +00:00
{% include "contest/media-js.html" %}
{% include "comments/media-js.html" %}
2022-11-17 09:09:28 +00:00
{% include "actionbar/media-js.html" %}
2020-01-21 06:35:58 +00:00
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block two_col_media %}
2020-01-21 06:35:58 +00:00
{% include "comments/media-css.html" %}
2022-11-17 00:48:32 +00:00
{% include "actionbar/media-css.html" %}
2020-01-21 06:35:58 +00:00
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block middle_content %}
{% include "contest/contest-datetime.html" %}
2020-01-21 06:35:58 +00:00
<div class="content-description">
{% cache 3600 'contest_html' contest.id MATH_ENGINE %}
2022-10-25 04:59:04 +00:00
{{ contest.description|markdown|reference|str|safe }}
2020-01-21 06:35:58 +00:00
{% endcache %}
</div>
2021-05-24 20:00:36 +00:00
{% if contest.ended or request.user.is_superuser or is_editor or is_tester %}
2020-01-21 06:35:58 +00:00
<hr>
<div class="contest-problems">
<h2 style="margin-bottom: 0.2em"><i class="fa fa-fw fa-question-circle"></i>{{ _('Problems') }} </h2>
<table id="contest-problems" class="table">
<thead>
<tr>
<th>{{ _('Problem') }}</th>
<th>{{ _('Points') }}</th>
<th>{{ _('AC Rate') }}</th>
<th>{{ _('Users') }}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for problem in contest_problems %}
<tr>
<td>
{% if problem.is_public %}
<a href="{{ url('problem_detail', problem.code) }}">{{ problem.i18n_name }}</a>
{% else %}
{{ problem.i18n_name }}
{% endif %}
</td>
<td>{{ problem.points|floatformat }}{% if problem.partial %}p{% endif %}</td>
<td>{{ problem.ac_rate|floatformat(1) }}%</td>
<td>
{% if problem.is_public %}
<a href="{{ url('ranked_submissions', problem.code) }}">{{ problem.user_count }}</a>
{% else %}
{{ problem.user_count }}
{% endif %}
</td>
<td>
{% if problem.is_public and problem.has_public_editorial %}
<a href="{{ url('problem_editorial', problem.code) }}">{{ _('Editorial') }}</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
2022-11-17 00:48:32 +00:00
<hr>
2020-01-21 06:35:58 +00:00
{% endif %}
2022-11-17 00:48:32 +00:00
{% include "actionbar/list.html" %}
<br>
2020-01-21 06:35:58 +00:00
{% include "comments/list.html" %}
2022-11-27 07:03:38 +00:00
{% endblock %}