mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复discussion模块
This commit is contained in:
1 parent
2554cf660a
commit
33e277f28f
30 files changed
+2460
-187
No files matched your search
@@ -10,7 +10,7 @@
|
||||
<ol class="menu">
|
||||
{% if page_name == 'discussion_node' or page_name == 'discussion_detail' %}
|
||||
{% if handler.hasPerm(perm.PERM_CREATE_DISCUSSION) %}
|
||||
<li class="menu__item"><a class="menu__link highlight" href="{{ reverse_url('discussion_create_document_as_node', doc_type=pdoc['doc_type'], doc_id=pdoc['_id']) }}">
|
||||
<li class="menu__item"><a class="menu__link highlight" href="/discuss/problem/{{ pdoc._id }}/create">
|
||||
<span class="icon icon-add"></span> {{ _('Create a Discussion') }}
|
||||
</a></li>
|
||||
{% else %}
|
||||
@@ -55,7 +55,7 @@
|
||||
<li class="menu__seperator"></li>
|
||||
{% endif %}
|
||||
{% if handler.hasPerm(perm.PERM_VIEW_DISCUSSION) %}
|
||||
<li class="menu__item"><a class="menu__link{% if page_name == 'discussion_node' or page_name == 'discussion_detail' %} active{% endif %}" href="{{ reverse_url('discussion_node_document_as_node', doc_type=pdoc['doc_type'], doc_id=pdoc['_id']) }}">
|
||||
<li class="menu__item"><a class="menu__link{% if page_name == 'discussion_node' or page_name == 'discussion_detail' %} active{% endif %}" href="/discuss/problem/{{ pdoc._id }}">
|
||||
<span class="icon icon-comment--text"></span> {{ _('Discussions') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
@@ -89,15 +89,13 @@
|
||||
</div>
|
||||
<div class="section__body typo">
|
||||
<dl class="large horizontal">
|
||||
{% if pdoc['_id']|string|length < 10 %}
|
||||
<dt>{{ _('ID') }}</dt>
|
||||
<dd>{{ pdoc['_id'] }}</dd>
|
||||
{% endif %}
|
||||
<dd>{{ pdoc['pid'] }}</dd>
|
||||
{% if page_name != 'discussion_node' and page_name != 'discussion_detail' %}
|
||||
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}
|
||||
<dt>{{ _('Submission') }}</dt>
|
||||
<dd>
|
||||
{% if pdoc['psdoc']['status'] %}
|
||||
{% if pdoc.psdoc['status'] %}
|
||||
<span class="icon record-status--icon {{ model.builtin.STATUS_CODES[pdoc['psdoc']['status']] }}"></span>
|
||||
<a href="/r/{{ pdoc['psdoc']['rid'] }}" class="record-status--text {{ model.builtin.STATUS_CODES[pdoc['psdoc']['status']] }}">
|
||||
{{ model.builtin.STATUS_TEXTS[pdoc['psdoc']['status']] }}
|
||||
@@ -115,7 +113,7 @@
|
||||
{% if pdoc['category'] %}
|
||||
<span class="hasjs--hide" name="problem-sidebar__categories">
|
||||
{% for category in pdoc['category'] %}
|
||||
<a href="{{ reverse_url('problem_category', category=category) }}">{{ category }}</a>
|
||||
<a href="/p?category={{ category }}">{{ category }}</a>
|
||||
{% if loop.index < pdoc['category']|length %}
|
||||
{% if category in vj4.model.builtin.PROBLEM_CATEGORIES %}
|
||||
{{ _('problem-category-delim') }}
|
||||
@@ -152,10 +150,8 @@
|
||||
<dt>{{ _('Be Copied') }}</dt>
|
||||
<dd>{{ pdoc['num_be_copied'] }}</dd>
|
||||
{% endif %}
|
||||
{% if pdoc['owner'] != 0 %}
|
||||
<dt>{{ _('Uploaded By') }}</dt>
|
||||
<dd>{{ user.render_inline(owner_udoc, badge=false) }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -168,7 +164,7 @@
|
||||
{% if tdocs %}
|
||||
<p>{{ _('In following training plans') }}: </p>
|
||||
{% for tdoc in tdocs %}
|
||||
<p><a href="{{ reverse_url('training_detail', tid=tdoc._id) }}">{{ tdoc.title }}</a></p>
|
||||
<p><a href="/t/{{ tdoc._id }}">{{ tdoc.title }}</a></p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if ctdocs %}
|
||||
|
||||
Reference in new issue
Block a user