mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
add contest_user
This commit is contained in:
1 parent
d67a0339fd
commit
e6ffdaf11e
8 files changed
+206
-8
No files matched your search
@@ -35,11 +35,6 @@
|
||||
<p>{{ _('The contest is a flexible time contest. You need to complete the contest within a specified time after you attended.') }}</p>
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
{% if tdoc.code %}
|
||||
<blockquote class="note">
|
||||
<p>{{ _('The contest is a invitational contest. However it allow users attend contest without the invitation code. Those users will not be ranked.') }}</p>
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{% extends "layout/basic.html" %}
|
||||
{% import "components/contest.html" as contest with context %}
|
||||
{% import "components/record.html" as record with context %}
|
||||
{% import "components/problem.html" as problem with context %}
|
||||
{% block content %}
|
||||
{{ set(UiContext, 'tdoc', tdoc) }}
|
||||
<div class="row">
|
||||
<div class="medium-9 columns">
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Attender Manage') }}</h1>
|
||||
<div class="section__tools">
|
||||
<button class="primary rounded button" name="add_user"><span class="icon icon-search"></span>{{ _('Add User') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ noscript_note.render() }}
|
||||
<div class="section__body no-padding">
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
<col class="col--uid">
|
||||
<col class="col--user">
|
||||
<col class="col--start-time">
|
||||
<col class="col--end-time">
|
||||
<col class="col--rank">
|
||||
<col class="col--actions">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col--uid">{{ _('User ID') }}</th>
|
||||
<th class="col--user">{{ _('Username') }}</th>
|
||||
<td class="col--start-time">{{ _('Begin Time') }}</th>
|
||||
<th class="col--end-time">{{ _('End Time') }}</th>
|
||||
<th class="col--rank">{{ _('Rank') }}</th>
|
||||
<th class="col--actions">{{ _('Actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% include "partials/contest_user.html" %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-3 columns">
|
||||
{% set owner_udoc = udict[tdoc.owner] %}
|
||||
{% include "partials/contest_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -75,6 +75,9 @@
|
||||
<li class="menu__item"><a class="menu__link" href="{{ url('contest_files', tid=tdoc.docId) }}">
|
||||
<span class="icon icon-file"></span> {{ _('Files') }}
|
||||
</a></li>
|
||||
<li class="menu__item"><a class="menu__link" href="{{ url('contest_user', tid=tdoc.docId) }}">
|
||||
<span class="icon icon-user"></span> {{ _('Attender Manage') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if handler.user.own(tdoc) or handler.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE) or handler.user.hasPerm(perm.PERM_READ_RECORD_CODE) %}
|
||||
{% if model.contest.canShowRecord.call(handler, tdoc, true) %}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{% import "components/user.html" as user with context %}
|
||||
{% import "components/contest.html" as contest with context %}
|
||||
<tbody data-fragment-id="constest_user-tbody">
|
||||
{%- for tsdoc in tsdocs -%}
|
||||
<tr data-uid="{{ tsdoc.uid }}">
|
||||
<td class="col--uid">{{ tsdoc.uid }}</td>
|
||||
<td class="col--user">{{ user.render_inline(udict[tsdoc.uid], badge=false) }}</td>
|
||||
<td class="col--start-time">{{ contest.render_time(tsdoc.startAt or tdoc.beginAt) }}</td>
|
||||
<td class="col--end-time">{{ contest.render_time(tsdoc.endAt or tdoc.endAt) }}</td>
|
||||
<td class="col--rank">{{ _('UnRank') if tsdoc.unrank else _('Rank') }}</td>
|
||||
<td class="col--actions">
|
||||
<a name="edit_rank" data-uid="{{ tsdoc.uid }}">{{ _('Rank') if tsdoc.unrank else _('UnRank') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
</tbody>
|
||||
Reference in new issue
Block a user