Add icons to submission page

This commit is contained in:
cuom1999 2022-08-18 23:26:30 -05:00
parent f5c124a2e9
commit b43850d776
2 changed files with 17 additions and 9 deletions

View file

@ -11,18 +11,18 @@
{% elif submission.status == 'P' %}
<h4>{{ _('Your submission is being processed...') }}</h4>
{% elif submission.status == 'CE' %}
<h3>{{ _('Compilation Error') }}</h3>
<h3><i class="fa fa-exclamation-circle fa-fw"></i>{{ _('Compilation Error') }}</h3>
<pre>{{ submission.error|ansi2html }}</pre>
{% else %}
{% if submission.error %}
<h3>{{ _('Compilation Warnings') }}</h3>
<h3><i class="fa fa-exclamation-triangle fa-fw"></i>{{ _('Compilation Warnings') }}</h3>
<pre>{{ submission.error|ansi2html }}</pre>
<hr><br>
{% endif %}
{% if is_pretest %}
<h3>{{ _('Pretest Execution Results') }}</h3>
<h3><i class="fa fa-check-square-o fa-fw"></i>{{ _('Pretest Execution Results') }}</h3>
{% else %}
<h3>{{ _('Execution Results') }}</h3>
<h3><i class="fa fa-check-square-o fa-fw"></i>{{ _('Execution Results') }}</h3>
{% endif %}
<br>

View file

@ -25,6 +25,16 @@
.testcases-table tbody:last-child {
border-bottom: none;
}
.toggle {
cursor: pointer;
font-weight: 400;
}
#source-header {
font-size: 1.54em;
margin-bottom: 1em;
}
</style>
{% endblock %}
{% block content_js_media %}
@ -60,6 +70,7 @@
if ($(window).scrollTop() + $(window).height() > $(document).height() - 100)
$("html, body").animate({scrollTop: $(document).height()}, 0);
}
register_toggle($('#source-header'));
var receiver = new EventReceiver(
"{{ EVENT_DAEMON_LOCATION }}", "{{ EVENT_DAEMON_POLL_LOCATION }}",
@ -99,8 +110,8 @@
{% endif %}
<br>
<br>
<div class="source-wrap">
<h3 id="source-header" class="toggle closed"><i class="fa fa-chevron-right fa-fw"></i>{{_('Source code')}}</h3>
<div class="source-wrap toggled" style="display: none; margin-bottom: 1em">
<table style="width: 100%">
<tr>
<td class="source-ln" style="width: 0">
@ -116,11 +127,8 @@
</tr>
</table>
</div>
<br>
<br>
<div id="test-cases">{% include "submission/status-testcases.html" %}</div>
{% if not submission.is_graded %}
{% if perms.judge.abort_any_submission %}
<div id="abort-button">