Refactor contest ranking
This commit is contained in:
parent
73541ef8dd
commit
cc666c8361
6 changed files with 179 additions and 231 deletions
|
@ -134,28 +134,29 @@
|
|||
<input id="search-contest" type="text" placeholder="{{ _('View user participation') }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div style="margin-bottom: 0.5em">
|
||||
<input id="show-schools-checkbox" type="checkbox" style="vertical-align: bottom">
|
||||
<label for="show-schools-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show schools') }}</label>
|
||||
|
||||
<input id="show-fullnames-checkbox" type="checkbox" style="vertical-align: bottom">
|
||||
|
||||
<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;" {{"checked" if friend_only}}>
|
||||
<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; margin-right: 1em;">{{ _('Total score only') }}</label>
|
||||
<input id="show-virtual-checkbox" type="checkbox" style="vertical-align: bottom;" {{"checked" if include_virtual}}>
|
||||
<label id="show-virtual-label" for="show-virtual-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show virtual participation') }}</label>
|
||||
<i class="fa fa-spinner fa-pulse" style="display: none" id="loading-gif"></i>
|
||||
<a href="#" onclick="download_ranking_as_csv()">
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
{{ _('Download as CSV') }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div style="margin-bottom: 0.5em">
|
||||
<input id="show-schools-checkbox" type="checkbox" style="vertical-align: bottom">
|
||||
<label for="show-schools-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show schools') }}</label>
|
||||
|
||||
<input id="show-fullnames-checkbox" type="checkbox" style="vertical-align: bottom">
|
||||
|
||||
<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; 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; margin-right: 1em;">{{ _('Total score only') }}</label>
|
||||
<input id="show-virtual-checkbox" type="checkbox" style="vertical-align: bottom;">
|
||||
<label id="show-virtual-label" for="show-virtual-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show virtual participation') }}</label>
|
||||
<i class="fa fa-spinner fa-pulse" style="display: none" id="loading-gif"></i>
|
||||
<a href="#" onclick="download_ranking_as_csv()">
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
{{ _('Download as CSV') }}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block users_table %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue