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' %} {% elif submission.status == 'P' %}
<h4>{{ _('Your submission is being processed...') }}</h4> <h4>{{ _('Your submission is being processed...') }}</h4>
{% elif submission.status == 'CE' %} {% 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> <pre>{{ submission.error|ansi2html }}</pre>
{% else %} {% else %}
{% if submission.error %} {% 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> <pre>{{ submission.error|ansi2html }}</pre>
<hr><br> <hr><br>
{% endif %} {% endif %}
{% if is_pretest %} {% if is_pretest %}
<h3>{{ _('Pretest Execution Results') }}</h3> <h3><i class="fa fa-check-square-o fa-fw"></i>{{ _('Pretest Execution Results') }}</h3>
{% else %} {% else %}
<h3>{{ _('Execution Results') }}</h3> <h3><i class="fa fa-check-square-o fa-fw"></i>{{ _('Execution Results') }}</h3>
{% endif %} {% endif %}
<br> <br>

View file

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