mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
add unrank & star user on scoreboard ui
This commit is contained in:
1 parent
dc0e397d77
commit
b8fd94df50
5 files changed
+48
-11
No files matched your search
@@ -22,12 +22,20 @@
|
||||
{% if model.contest.isDone(tdoc) and tdoc.lockAt and handler.user.own(tdoc) and not tdoc.unlocked %}
|
||||
<form method="POST">
|
||||
<input type="hidden" name="operation" value="unlock">
|
||||
<button type="submit" class="button" href="{{ url(type + '_scoreboard_download', tid=tdoc.docId, ext='csv') }}">
|
||||
<button type="submit" class="button">
|
||||
<span class="icon icon-feeling-lucky"></span> {{ _('Unlock scoreboard') }}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<div class="section__tools">
|
||||
<select class="select" name="list">
|
||||
<option value="all">{{ _('All Users') }}</option>
|
||||
<option value="star">{{ _('Stared Users') }}</option>
|
||||
<option value="unrank">{{ _('Unrank Users') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<h1 style="text-align:center" class="section__title">{{ tdoc.title }}</h1>
|
||||
{% if model.contest.isLocked(tdoc) %}
|
||||
<div class="section__body no-padding">
|
||||
<blockquote class="note">
|
||||
@@ -71,6 +79,10 @@
|
||||
<td class="col--{{ rows[0][loop.index0]['type'] }}"{% if column.style %} style="{{ column.style }}"{% endif %}>
|
||||
{%- if column.type == 'user' -%}
|
||||
{%- set canView = canViewAll or handler.user._id == column.raw -%}
|
||||
<button class="star user--{{ colomn.raw }}">
|
||||
<span class="starred--hide"><span class="icon icon-star--outline" data-tooltip="{{ _('Star') }}"></span></span>
|
||||
<span class="starred--show"><span class="icon icon-star" data-tooltip="{{ _('Unstar') }}"></span></span>
|
||||
</button>
|
||||
{{ user.render_inline(udict[column.raw], badge=false) }}
|
||||
{%- elif column.type == 'record' and column.raw -%}
|
||||
<a href="{{ url('record_detail', rid=column.raw) if canView else '' }}" data-tooltip="{{ column.hover }}">
|
||||
|
||||
Reference in new issue
Block a user