NDOJ/templates/contest/moss.html

86 lines
2.4 KiB
HTML
Raw Permalink Normal View History

2022-11-27 07:03:38 +00:00
{% extends "two-column-content.html" %}
{% set page_type = 'moss' %}
2023-01-27 23:11:10 +00:00
2022-11-27 07:03:38 +00:00
{% block left_sidebar %}
2023-01-27 23:11:10 +00:00
{% include "contest/contest-tabs.html" %}
2020-01-21 06:35:58 +00:00
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block two_col_media %}
2023-01-27 23:11:10 +00:00
<style>
.panes {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.pane {
padding: 20px;
}
</style>
2020-01-21 06:35:58 +00:00
{% endblock %}
2024-06-24 19:56:00 +00:00
{% block js_media %}
2023-01-27 23:11:10 +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>
2020-01-21 06:35:58 +00:00
{% endblock %}
2022-11-27 07:03:38 +00:00
{% block middle_content %}
2023-01-27 23:11:10 +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>
2020-01-21 06:35:58 +00:00
{% if has_results %}
2023-01-27 23:11:10 +00:00
<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>
2020-01-21 06:35:58 +00:00
{% endif %}
2023-01-27 23:11:10 +00:00
</div>
2020-01-21 06:35:58 +00:00
{% endblock %}