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
@@ -127,6 +127,26 @@
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form.form_text({
|
||||
columns:9,
|
||||
label:'UnRank User',
|
||||
name:'unrankUser',
|
||||
help_text:_('User who will not show rank in scoreboard'),
|
||||
value:tdoc.unrankUser|default(''),
|
||||
row:false
|
||||
}) }}
|
||||
<div style="display: none" class="authorize-settings authorize--invite">
|
||||
{{ form.form_checkbox({
|
||||
columns:3,
|
||||
label:'Allow join by unrank',
|
||||
name:'uninvite',
|
||||
placeholder:_('Allow user join by unrank user without invite code'),
|
||||
value:tdoc.uninvite|default(true),
|
||||
row:false
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 0" class="section__header">
|
||||
<h2 class="section__title">{{ _('Contest Settings') }}</h2>
|
||||
@@ -134,12 +154,12 @@
|
||||
<div class="section__body">
|
||||
<div class="row">
|
||||
{{ form.form_checkbox({
|
||||
columns:2,
|
||||
label:'Rated',
|
||||
name:'rated',
|
||||
placeholder:_('Is rated'),
|
||||
value:tdoc.rated|default(true),
|
||||
row:false
|
||||
columns:2,
|
||||
label:'Rated',
|
||||
name:'rated',
|
||||
placeholder:_('Is rated'),
|
||||
value:tdoc.rated|default(true),
|
||||
row:false
|
||||
}) }}
|
||||
{{ form.form_checkbox({
|
||||
columns:3,
|
||||
@@ -164,7 +184,7 @@
|
||||
label:'Lock (minutes)',
|
||||
name:'lock',
|
||||
placeholder:_('(leave blank if none)'),
|
||||
value:(((tdoc.endAt - tdoc.lockAt)/60000)|int)|default(''),
|
||||
value:(((tdoc.endAt - tdoc.lockAt)/60000)|int) if tdoc.lockAt else '',
|
||||
help_text:_('Lock scoreboard on last N minutes'),
|
||||
disabled:true,
|
||||
row:false
|
||||
|
||||
@@ -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