mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
重构框架,增加比赛功能
This commit is contained in:
1 parent
0e590ebe0d
commit
9bf3343a64
54 files changed
+1196
-868
No files matched your search
@@ -79,7 +79,7 @@
|
||||
<div class="section__body no-padding training__problems">
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<col class="col--status">
|
||||
{% endif %}
|
||||
<col class="col--name">
|
||||
@@ -89,7 +89,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
||||
{% endif %}
|
||||
<th class="col--name">{{ _('Problem') }}</th>
|
||||
@@ -103,7 +103,7 @@
|
||||
{% if pid in pdict %}
|
||||
{% with pdoc=pdict[pid], psdoc=psdict[pid] %}
|
||||
<tr>
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
{% if psdoc['rid'] %}
|
||||
{{ record.render_status_td(psdoc, rid_key='rid') }}
|
||||
{% else %}
|
||||
@@ -111,7 +111,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class="col--name col--problem-name">
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<form class="form--inline" action="{{ reverse_url('problem_main') }}" method="post">
|
||||
<input type="hidden" name="pid" value="{{ pdoc['_id'] }}">
|
||||
<input type="hidden" name="operation" value="{% if not psdoc['star'] %}star{% else %}unstar{% endif %}">
|
||||
@@ -164,7 +164,7 @@
|
||||
<div class="section side">
|
||||
<div>
|
||||
<ol class="menu">
|
||||
{% if not tsdoc['enroll'] and handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if not tsdoc['enroll'] and handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<li class="menu__item">
|
||||
<form action="" method="POST">
|
||||
<input type="hidden" name="operation" value="enroll">
|
||||
@@ -175,7 +175,7 @@
|
||||
</form>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if handler.own(tdoc, perm.PERM_EDIT_TRAINING_SELF) or handler.has_perm(perm.PERM_EDIT_TRAINING) %}
|
||||
{% if handler.own(tdoc, perm.PERM_EDIT_TRAINING_SELF) or handler.hasPerm(perm.PERM_EDIT_TRAINING) %}
|
||||
<li class="menu__item"><a class="menu__link" href="{{ reverse_url('training_edit', tid=tdoc['doc_id']) }}">
|
||||
<span class="icon icon-edit"></span> {{ _('Edit') }}
|
||||
</a></li>
|
||||
@@ -188,7 +188,7 @@
|
||||
</div>
|
||||
<div class="section__body typo">
|
||||
<dl class="large horizontal">
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<dt>{{ _('Status') }}</dt><dd>{% if tsdoc['enroll'] %}{{ _('Completed' if tsdoc['done'] else 'In Progress') }}{% else %}{{ _('Not Enrolled') }}{% endif %}</dd>
|
||||
{% endif %}
|
||||
{% if tsdoc['enroll'] %}
|
||||
|
||||
Reference in new issue
Block a user