Add option to only show total score in contest

This commit is contained in:
cuom1999 2020-10-26 15:46:42 -05:00
parent 26c277c612
commit eadd4f2ad3
25 changed files with 7849 additions and 5710 deletions

View file

@ -329,6 +329,16 @@
})
{% endif %}
$('#show-total-score-checkbox').click(function() {
let checked = $('#show-total-score-checkbox').is(':checked');
if (checked) {
$('.problem-score-col').hide();
}
else {
$('.problem-score-col').show();
}
})
highlightFirstSolve();
});
@ -348,11 +358,13 @@
<input id="show-fullnames-checkbox" type="checkbox" style="vertical-align: bottom">
<label for="show-fullnames-checkbox" style="vertical-align: bottom; margin-right: 1em;">Hiển thị tên thật</label>
<label for="show-fullnames-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show full name') }}</label>
{% if request.user.is_authenticated %}
<input id="show-friends-checkbox" type="checkbox" style="vertical-align: bottom;">
<label for="show-friends-checkbox" style="vertical-align: bottom;">{{ _('Show friends only') }}</label>
<label for="show-friends-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show friends only') }}</label>
{% endif %}
<input id="show-total-score-checkbox" type="checkbox" style="vertical-align: bottom;">
<label for="show-total-score-checkbox" style="vertical-align: bottom;">{{ _('Total score only') }}</label>
</div>
{% include "contest/ranking-table.html" %}
{% endblock %}