NDOJ/templates/problem/submission-diff.html

99 lines
2.5 KiB
HTML
Raw Permalink Normal View History

2020-01-21 06:35:58 +00:00
{% extends "common-content.html" %}
{% block js_media %}
2023-01-27 23:11:10 +00:00
<script type="text/javascript">
$(function () {
$('a.sub-case-status').featherlight($('.partial-output-window'), {
afterOpen: function () {
var $parent = this.$currentTarget.parent();
var partial = $parent.attr('data-partial-output');
this.$instance.find('.partial-output-window').find('code').text(partial).end().show();
}
});
});
</script>
<script type="text/javascript">
</script>
2020-01-21 06:35:58 +00:00
{% endblock %}
{% block media %}
2023-01-27 23:11:10 +00:00
<style>
#content-body {
overflow-x: auto;
padding-bottom: 0;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-id {
width: 4em;
min-width: 4em;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-username {
width: 5em;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-result {
width: 3em;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-language {
width: 6em;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-date {
min-width: 8em;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-case {
min-width: 3em;
}
2020-01-21 06:35:58 +00:00
2023-01-27 23:11:10 +00:00
.sub-case-status {
text-decoration: underline;
}
</style>
2020-01-21 06:35:58 +00:00
{% endblock %}
{% block body %}
2023-01-27 23:11:10 +00:00
<table id="case-table" class="table">
<thead>
<tr>
<th class="sub-id">ID</th>
<th class="sub-username">Username</th>
<th class="sub-result">Result</th>
<th class="sub-language">Language</th>
<th class="sub-date">Date</th>
{% for case in range(num_cases) %}
<th class="sub-case">{{ loop.index }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for sub in submissions %}
2020-01-21 06:35:58 +00:00
<tr>
2023-01-27 23:11:10 +00:00
<td><a href="{{ url('submission_source', sub.id) }}">{{ sub.id }}</a></td>
<td>{{ link_user(sub.user) }}</td>
<td><span class="case-{{ sub.result }}">{{ sub.result }}</span></td>
<td>{{ sub.language.name }}</td>
<td><span class="time">{{ relative_time(sub.date) }}</span></td>
{% for case in sub.test_cases.all() %}
<td data-partial-output="{{ case.output }}">
{% if case.status == 'SC' %}
<span class="case-SC">---</span>
{% else %}
<a href="javascript:void(0);" class="sub-case-status case-{{ case.status }}">
{% if case.status == 'AC' %}
{{ case.time|floatformat(2) }}
{% else %}
{{ case.status }}
{% endif %}
</a>
{% endif %}
</td>
{% endfor %}
2020-01-21 06:35:58 +00:00
</tr>
2023-01-27 23:11:10 +00:00
{% endfor %}
</tbody>
</table>
<div style="display: none" class="partial-output-window"><pre><code></code></pre></div>
2020-01-21 06:35:58 +00:00
{% endblock %}