mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core&ui: new domain_join logic
This commit is contained in:
1 parent
706a9a0928
commit
7fd01715bc
9 files changed
+81
-39
No files matched your search
@@ -489,6 +489,8 @@ IOI(Strict): IOI(严格)
|
||||
Is rated: 计入排名
|
||||
It works!: 它成了!
|
||||
Italic: 斜体
|
||||
Join Domain to Create a Discussion: 加入域后创建讨论
|
||||
Join Domain to Submit: 加入域后递交
|
||||
Join: 加入
|
||||
Judge Config: 评测设置
|
||||
Judge Status: 评测状态
|
||||
@@ -603,6 +605,7 @@ Not Attended: 未参加
|
||||
Not available: 不可用
|
||||
Not Claimed: 未认领
|
||||
Not Enrolled: 未参加
|
||||
Not joined yet: 暂未加入
|
||||
Not started with a number: 不以数字开头
|
||||
Not wrapped with space: 两侧不含空格
|
||||
Numeric PID: 数字题号
|
||||
@@ -698,9 +701,9 @@ problem_import: 导入题目
|
||||
problem_main: 题库
|
||||
problem_solution: 题解
|
||||
problem_submit: 递交代码
|
||||
problem_type.communication: 通信题
|
||||
problem_type.default: 传统题
|
||||
problem_type.interactive: 交互题
|
||||
problem_type.communication: 通信题
|
||||
problem_type.objective: 客观题
|
||||
problem_type.remote_judge: 远端评测题
|
||||
problem_type.submit_answer: 提交答案题
|
||||
|
||||
@@ -5,12 +5,25 @@
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">
|
||||
{{ _('Join {0}').format(handler.domain['name']) }}
|
||||
{% if joinSettings %}
|
||||
{{ _('Join {0}').format(domainInfo['name']) }}
|
||||
{% else %}
|
||||
{{ _('You are invited to join {0}').format(domainInfo['name']) }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="section__body typo">
|
||||
<p>{{ _('By clicking the button, you will become a member of the domain {0}.').format(handler.domain['name']) }}</p>
|
||||
<p>{{ _('By clicking the button, you will become a member of the domain {0}.').format(domainInfo['name']) }}</p>
|
||||
</div>
|
||||
<div class="section__body typo">
|
||||
<p>{{ _('The domain owner:') }}</p>
|
||||
{{ user.render_inline(domainInfo['owner']) }}
|
||||
</div>
|
||||
{% if domainInfo['bulletin'] %}
|
||||
<div class="section__body typo">
|
||||
{{ domainInfo['bulletin']|markdown }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section__body typo">
|
||||
<form method="post">
|
||||
{% if joinSettings['method'] == model.domain.JOIN_METHOD_CODE %}
|
||||
@@ -24,6 +37,8 @@
|
||||
autofocus:true
|
||||
}) }}
|
||||
{% endif %}
|
||||
<input type="hidden" name="target" value="{{ target }}">
|
||||
<input type="hidden" name="redirect" value="{{ redirect }}">
|
||||
<button type="submit" class="primary rounded button">{{ _('Join') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -25,14 +25,6 @@
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Settings') }}</h1>
|
||||
</div>
|
||||
{% if rolesWithText.length == 1 %}
|
||||
<div class="section__body typo">
|
||||
<blockquote class="warn">
|
||||
<p>{{ _("The 'default' role applies to ALL REGISTERED USER.")|safe }}</p>
|
||||
<p>{{ _("You may want to create a new role in 'Manage Role' page.")|safe }}</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section__body">
|
||||
<form method="POST">
|
||||
{{ form.form_select({
|
||||
|
||||
@@ -5,14 +5,6 @@
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('{0}: Permissions').format(domain.name) }}</h1>
|
||||
</div>
|
||||
{% if roles.length == 3 %}
|
||||
<div class="section__body typo">
|
||||
<blockquote class="warn">
|
||||
<p>{{ _("The 'default' role applies to ALL REGISTERED USER.")|safe }}</p>
|
||||
<p>{{ _("You may want to create a new role in 'Manage Role' page.")|safe }}</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section__body no-padding domain-users">
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
|
||||
@@ -100,7 +100,8 @@
|
||||
{{ rudoc._id }}
|
||||
</td>
|
||||
<td class="col--user">
|
||||
{{ user.render_inline(udict[rudoc._id], badge=false) }}
|
||||
{{ user.render_inline(rudoc, badge=false) }}
|
||||
{% if not joined[rudoc._id] %}<span class="text-orange">({{ _('Not joined yet') }})</span>{% endif %}
|
||||
</td>
|
||||
<td class="col--role">
|
||||
{{ form.select({
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||
<li class="menu__item"><a class="menu__link" href="javascript:showSignInDialog();">
|
||||
<span class="icon icon-add"></span> {{ _('Login to Create a Discussion') }}</a></li>
|
||||
{% elif not handler.user._dudoc.join %}
|
||||
<li class="menu__item"><a class="menu__link" href="javascript:joinDomain();">
|
||||
<span class="icon icon-add"></span> {{ _('Join Domain to Create a Discussion') }}</a></li>
|
||||
{% else %}
|
||||
<li class="menu__item"><a class="menu__link disabled" href="javascript:;">
|
||||
<span class="icon icon-add"></span> {{ _('No Permission to Create a Discussion') }}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -46,6 +48,10 @@
|
||||
<li class="menu__item scratchpad--hide"><a class="menu__link{% if page_name == 'problem_submit' %} active{% endif %}" href="javascript:showSignInDialog();">
|
||||
<span class="icon icon-send"></span> {{ _('Login to Submit') }}
|
||||
</a></li>
|
||||
{% elif not handler.user._dudoc.join %}
|
||||
<li class="menu__item scratchpad--hide"><a class="menu__link disabled{% if page_name == 'problem_submit' %} active{% endif %}" href="javascript:joinDomain();">
|
||||
<span class="icon icon-send"></span> {{ _('Join Domain to Submit') }}
|
||||
</a></li>
|
||||
{% else %}
|
||||
<li class="menu__item scratchpad--hide"><a class="menu__link disabled{% if page_name == 'problem_submit' %} active{% endif %}" href="javascript:;">
|
||||
<span class="icon icon-send"></span> {{ _('No Permission to Submit') }}
|
||||
|
||||
Reference in new issue
Block a user