Make judges in problem page togglable
This commit is contained in:
parent
cef059ea9d
commit
f208930a3d
2 changed files with 16 additions and 10 deletions
|
@ -4750,7 +4750,7 @@ msgstr[0] "Máy chấm:"
|
||||||
|
|
||||||
#: templates/problem/problem.html:351
|
#: templates/problem/problem.html:351
|
||||||
msgid "none available"
|
msgid "none available"
|
||||||
msgstr "không có sẵn"
|
msgstr "Bài này chưa có máy chấm"
|
||||||
|
|
||||||
#: templates/problem/problem.html:363
|
#: templates/problem/problem.html:363
|
||||||
#, python-format
|
#, python-format
|
||||||
|
|
|
@ -108,6 +108,10 @@
|
||||||
if (window.location.href.includes('#comment')) {
|
if (window.location.href.includes('#comment')) {
|
||||||
$('#comment-announcement').click();
|
$('#comment-announcement').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% if not available_judge %}
|
||||||
|
$('#judge-toggle').click();
|
||||||
|
{% endif %}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -330,14 +334,16 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if problem.is_editable_by(request.user) %}
|
{% if problem.is_editable_by(request.user) %}
|
||||||
<div id="available-judges">
|
<div id="available-judges">
|
||||||
<i class="fa fa-database fa-fw"></i><span
|
<div class="toggle closed" id="judge-toggle">
|
||||||
class="pi-name">{% trans trimmed count=available_judges|length %}
|
<i class="fa fa-chevron-right fa-fw"></i><span
|
||||||
Judge:
|
class="pi-name">{% trans trimmed count=available_judges|length %}
|
||||||
{% pluralize count %}
|
Judge:
|
||||||
Judges:
|
{% pluralize count %}
|
||||||
{% endtrans %}
|
Judges:
|
||||||
</span>
|
{% endtrans %}
|
||||||
<div class="pi-value judges-value">
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="pi-value judges-value toggled" style="display: none;">
|
||||||
{% if available_judges %}
|
{% if available_judges %}
|
||||||
{% if perms.judge.change_judge %}
|
{% if perms.judge.change_judge %}
|
||||||
{% for judge in available_judges %}
|
{% for judge in available_judges %}
|
||||||
|
@ -348,7 +354,7 @@
|
||||||
{{ available_judges|join(", ") }}
|
{{ available_judges|join(", ") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<i>{{ _('none available') }}</i>
|
<i style="color: red">{{ _('none available') }}</i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue