New Problem UI (Problem Information & Submit Button) (#95)
This commit is contained in:
parent
32a1ea8919
commit
729a28bce5
5 changed files with 177 additions and 15 deletions
|
@ -49,6 +49,11 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content_js_media %}
|
||||
<script>
|
||||
function redirectTo(url) {
|
||||
window.location.href = url;
|
||||
}
|
||||
</script>
|
||||
{% include "comments/media-js.html" %}
|
||||
{% include "actionbar/media-js.html" %}
|
||||
{% if request.in_contest_mode %}
|
||||
|
@ -138,9 +143,12 @@
|
|||
{% block info_float %}
|
||||
{% if request.user.is_authenticated and request.in_contest_mode and submission_limit %}
|
||||
{% if submissions_left > 0 %}
|
||||
<a href="{{ url('problem_submit', problem.code) }}" class="unselectable button full btn-green small">
|
||||
{{ _('Submit solution') }}
|
||||
</a>
|
||||
<button onclick="redirectTo('{{ url('problem_submit', problem.code) }}')" class="btn-green btn btn-primary btn-block btn-round">
|
||||
<span>{{ _('Submit') }}</span>
|
||||
<div class="icon icon-round d-flex align-items-center justify-content-center">
|
||||
<i class="fa fa-send"></i>
|
||||
</div>
|
||||
</button>
|
||||
<div class="submissions-left">
|
||||
{% trans trimmed counter=submissions_left %}
|
||||
{{ counter }} submission left
|
||||
|
@ -149,13 +157,21 @@
|
|||
{% endtrans %}
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="unselectable button full disabled small">{{ _('Submit solution') }}</a>
|
||||
<button class="btn btn-disabled btn-block btn-round">
|
||||
<span>{{ _('Submit') }}</span>
|
||||
<div class="icon icon-round d-flex align-items-center justify-content-center">
|
||||
<i class="fa fa-send"></i>
|
||||
</div>
|
||||
</button>
|
||||
<div class="no-submissions-left submissions-left">{{ _('0 submissions left') }}</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ url('problem_submit', problem.code) }}" class="unselectable button full btn-green small">
|
||||
{{ _('Submit solution') }}
|
||||
</a>
|
||||
<button onclick="redirectTo('{{ url('problem_submit', problem.code) }}')" class="btn-green btn btn-primary btn-block btn-round">
|
||||
<span>{{ _('Submit') }}</span>
|
||||
<div class="icon icon-round d-flex align-items-center justify-content-center">
|
||||
<i class="fa fa-send"></i>
|
||||
</div>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<hr style="padding-bottom: 0.3em">
|
||||
|
@ -295,7 +311,7 @@
|
|||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class = "new-problem-info center">
|
||||
<div class = "new-problem-info d-flex-problem">
|
||||
<span class="info-block">
|
||||
<i class="fa fa-check fa-fw"></i><span class="pi-name">{{ _('Points:') }}</span>
|
||||
<span class="new-pi-value">
|
||||
|
@ -324,7 +340,7 @@
|
|||
</span>
|
||||
</span>
|
||||
|
||||
<span class="info-block">
|
||||
<span>
|
||||
<i class="fa fa-file fa-fw"></i><span class="pi-name">{{ _('Output:') }}</span>
|
||||
<span class="new-pi-value">{{ fileio_output or _('stdout') }}</span>
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue