mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
template: problem_list
This commit is contained in:
1 parent
fc26af30ef
commit
2e23d05a59
28 files changed
+357
-270
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_priv(vj4.model.builtin.PRIV_USER_PROFILE) %}
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
<col class="col--status">
|
||||
{% endif %}
|
||||
<col class="col--name">
|
||||
@@ -89,7 +89,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
{% if handler.has_priv(vj4.model.builtin.PRIV_USER_PROFILE) %}
|
||||
{% if handler.has_perm(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_priv(vj4.model.builtin.PRIV_USER_PROFILE) %}
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
{% if psdoc['rid'] %}
|
||||
{{ record.render_status_td(psdoc, rid_key='rid') }}
|
||||
{% else %}
|
||||
@@ -111,9 +111,9 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class="col--name col--problem-name">
|
||||
{% if handler.has_priv(vj4.model.builtin.PRIV_USER_PROFILE) %}
|
||||
{% if handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
<form class="form--inline" action="{{ reverse_url('problem_main') }}" method="post">
|
||||
<input type="hidden" name="pid" value="{{ pdoc['doc_id'] }}">
|
||||
<input type="hidden" name="pid" value="{{ pdoc['_id'] }}">
|
||||
<input type="hidden" name="operation" value="{% if not psdoc['star'] %}star{% else %}unstar{% endif %}">
|
||||
<input type="hidden" name="csrf_token" value="{{ handler.csrf_token }}">
|
||||
<button class="star{% if psdoc['star'] %} activated{% endif %}" type="submit">
|
||||
@@ -164,7 +164,7 @@
|
||||
<div class="section side">
|
||||
<div>
|
||||
<ol class="menu">
|
||||
{% if not tsdoc['enroll'] and handler.has_priv(vj4.model.builtin.PRIV_USER_PROFILE) %}
|
||||
{% if not tsdoc['enroll'] and handler.has_perm(perm.PERM_LOGGEDIN) %}
|
||||
<li class="menu__item">
|
||||
<form action="" method="POST">
|
||||
<input type="hidden" name="operation" value="enroll">
|
||||
@@ -188,7 +188,7 @@
|
||||
</div>
|
||||
<div class="section__body typo">
|
||||
<dl class="large horizontal">
|
||||
{% if handler.has_priv(vj4.model.builtin.PRIV_USER_PROFILE) %}
|
||||
{% if handler.has_perm(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