NDOJ/templates/contest/moss.html

86 lines
2.9 KiB
HTML
Raw Permalink Normal View History

2022-11-27 07:03:38 +00:00
{% extends "two-column-content.html" %}
{% set page_type = 'moss' %}
{% block left_sidebar %}
2020-01-21 06:35:58 +00:00
{% include "contest/contest-tabs.html" %}
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block two_col_media %}
2020-01-21 06:35:58 +00:00
<style>
.panes {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.pane {
padding: 20px;
}
</style>
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block two_col_js %}
2020-01-21 06:35:58 +00:00
<script type="text/javascript">
$(function () {
$('.contest-moss').click(function () {
return confirm('{{ _('Are you sure you want MOSS the contest?') }}');
});
});
$(function () {
$('.contest-moss-delete').click(function () {
return confirm('{{ _('Are you sure you want to delete the MOSS results?') }}');
});
});
</script>
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block middle_content %}
2020-01-21 06:35:58 +00:00
{% if has_results %}
<table class="table">
<thead>
<tr>
<th class="header">{{ _('Problem') }}</th>
{% for lang in languages %}
<th class="header">{{ lang }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for problem, results in moss_results %}
<tr id="problem-{{ problem.code }}">
<td>
<a href="{{ url('problem_detail', problem.code) }}">{{ problem.name }}</a>
</td>
{% for result in results %}
<td>
{% if result.submission_count %}
<a href="{{ result.url }}">{{ result.submission_count }} {{_('submissions')}}</a>
{% else %}
{{ _('No submissions') }}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div class="panes">
<div class="pane">
<form method="post" action="{{ url('contest_moss', contest.key) }}">
{% csrf_token %}
<input type="submit" class="unselectable button full contest-moss" style="padding: 10px;"
value="{% if has_results %} {{ _('Re-MOSS contest') }} {% else %} {{ _('MOSS contest') }} {% endif %}">
</form>
</div>
{% if has_results %}
<div class="pane">
<form method="post" action="{{ url('contest_moss_delete', contest.key) }}">
{% csrf_token %}
<input type="submit" class="unselectable button full contest-moss-delete" style="padding: 10px;"
value="{{ _('Delete MOSS results') }}">
</form>
</div>
{% endif %}
</div>
{% endblock %}