mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: domain_user: add join domain hint
This commit is contained in:
7 files changed
+34
-5
No files matched your search
@@ -32,6 +32,7 @@ __langname: 한국어
|
|||||||
'Join {0}': '참여 {0}'
|
'Join {0}': '참여 {0}'
|
||||||
'No': 아니오
|
'No': 아니오
|
||||||
'Note: Problem title may not be hidden.': '주의: 문제 제목은 숨길 수 없습니다.'
|
'Note: Problem title may not be hidden.': '주의: 문제 제목은 숨길 수 없습니다.'
|
||||||
|
'Or use the following link:': '또는 다음 링크를 사용하세요:'
|
||||||
'Role {1} already exists in domain {0}.': '역할 {1}이(가) 이미 {0}에 존재합니다.'
|
'Role {1} already exists in domain {0}.': '역할 {1}이(가) 이미 {0}에 존재합니다.'
|
||||||
'Solved {0} problems, RP: {1} (No. {2})': '총 {0} 문제 해결.RP: {1} (No. {2})'
|
'Solved {0} problems, RP: {1} (No. {2})': '총 {0} 문제 해결.RP: {1} (No. {2})'
|
||||||
'The value `{1}` of {0} already exists.': '{0} 의 값 `{1}` 이 이미 존재합니다.'
|
'The value `{1}` of {0} already exists.': '{0} 의 값 `{1}` 이 이미 존재합니다.'
|
||||||
@@ -42,9 +43,6 @@ __langname: 한국어
|
|||||||
(All Problems): (전체 문제)
|
(All Problems): (전체 문제)
|
||||||
(None): (N/A)
|
(None): (N/A)
|
||||||
(Not changed): 수정되지 않음
|
(Not changed): 수정되지 않음
|
||||||
#Sample Input: Sample Input
|
|
||||||
#Sample Output: Sample Output
|
|
||||||
#Star: Star
|
|
||||||
Aborted: 중지됨
|
Aborted: 중지됨
|
||||||
About {0}: '{0}에 대하여'
|
About {0}: '{0}에 대하여'
|
||||||
About Markdown: Markdown에 대하여
|
About Markdown: Markdown에 대하여
|
||||||
@@ -758,6 +756,7 @@ User-defined role: 사용자 지정 역할
|
|||||||
User: 사용자
|
User: 사용자
|
||||||
Username / UID: 아이디
|
Username / UID: 아이디
|
||||||
Username: 아이디
|
Username: 아이디
|
||||||
|
Users will have to manually join the domain first before selected roles can be applied.: 사용자는 먼저 도메인에 수동으로 참여해야 선택된 역할을 적용할 수 있습니다.
|
||||||
Users with those roles will be removed from the domain.: 이 역할을 가진 사용자들이 그룹에서 제거될 것입니다.
|
Users with those roles will be removed from the domain.: 이 역할을 가진 사용자들이 그룹에서 제거될 것입니다.
|
||||||
Users: 사용자
|
Users: 사용자
|
||||||
Using your {0} universal account: '{0} 공용 계정을 사용'
|
Using your {0} universal account: '{0} 공용 계정을 사용'
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ __langname: 简体中文
|
|||||||
'Join {0}': '加入 {0}'
|
'Join {0}': '加入 {0}'
|
||||||
'No': 否
|
'No': 否
|
||||||
'Note: Problem title may not be hidden.': 注意:题目标题可能不会被隐藏。
|
'Note: Problem title may not be hidden.': 注意:题目标题可能不会被隐藏。
|
||||||
|
'Or use the following link:': 或使用以下链接:
|
||||||
'Packages have new version: {0}': '以下组件有新版本: {0}'
|
'Packages have new version: {0}': '以下组件有新版本: {0}'
|
||||||
'Please use your two factor authentication app to scan the qrcode below:': '请使用你的两步验证APP扫描此二维码:'
|
'Please use your two factor authentication app to scan the qrcode below:': '请使用你的两步验证APP扫描此二维码:'
|
||||||
'Role {1} already exists in domain {0}.': '域 {0} 中已存在角色 {1}。'
|
'Role {1} already exists in domain {0}.': '域 {0} 中已存在角色 {1}。'
|
||||||
@@ -943,6 +944,7 @@ Timezone: 时区
|
|||||||
title: 标题
|
title: 标题
|
||||||
Title: 标题
|
Title: 标题
|
||||||
To get a better editing experience, with code highlighting and test runs, please go back to the problem detail page and use 'Open Scratchpad' button.: 为了获得更好的编辑体验,包括代码高亮和测试运行功能,请返回题目详情页面并点击“进入在线编程模式”按钮。
|
To get a better editing experience, with code highlighting and test runs, please go back to the problem detail page and use 'Open Scratchpad' button.: 为了获得更好的编辑体验,包括代码高亮和测试运行功能,请返回题目详情页面并点击“进入在线编程模式”按钮。
|
||||||
|
To join the domain, users can click the "Join Domain" button on "My Domain" page.: 要加入域,用户可以点击“我的域”页面中的“加入域”按钮。
|
||||||
Toggle Pretest Panel: 切换自测面板
|
Toggle Pretest Panel: 切换自测面板
|
||||||
Toggle Preview: 切换预览
|
Toggle Preview: 切换预览
|
||||||
Toggle Records Panel: 切换评测记录面板
|
Toggle Records Panel: 切换评测记录面板
|
||||||
@@ -1009,6 +1011,7 @@ User-defined role: 用户定义的角色
|
|||||||
User: 用户
|
User: 用户
|
||||||
Username / UID: 用户名或 UID
|
Username / UID: 用户名或 UID
|
||||||
Username: 用户名
|
Username: 用户名
|
||||||
|
Users will have to manually join the domain first before selected roles can be applied.: 用户需要先手动加入域才能应用此角色分配。
|
||||||
Users with those roles will be removed from the domain.: 拥有这些角色的用户将从此域中移除。
|
Users with those roles will be removed from the domain.: 拥有这些角色的用户将从此域中移除。
|
||||||
Users: 用户
|
Users: 用户
|
||||||
Using your {0} universal account: 使用您的 {0} 通用账户
|
Using your {0} universal account: 使用您的 {0} 通用账户
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ __langname: 正體中文
|
|||||||
'Hello, {0}! You can click following link to reset the password of your {1} account:': 您好,{0}!您可以點選以下連結來重置您 {1} 賬戶的密碼:
|
'Hello, {0}! You can click following link to reset the password of your {1} account:': 您好,{0}!您可以點選以下連結來重置您 {1} 賬戶的密碼:
|
||||||
'Hello! You can click following link to sign up your {0} account:': 您好!您可以點選以下連結來註冊您的 {0} 賬戶:
|
'Hello! You can click following link to sign up your {0} account:': 您好!您可以點選以下連結來註冊您的 {0} 賬戶:
|
||||||
'No': 否
|
'No': 否
|
||||||
|
'Or use the following link:': 或使用以下連結:
|
||||||
'Solved {0} problems, RP: {1} (No. {2})': '解決了 {0} 道題目,RP: {1} (No. {2})'
|
'Solved {0} problems, RP: {1} (No. {2})': '解決了 {0} 道題目,RP: {1} (No. {2})'
|
||||||
'Yes': 是
|
'Yes': 是
|
||||||
(None): (無)
|
(None): (無)
|
||||||
@@ -480,6 +481,7 @@ timeago_locale: zh_TW
|
|||||||
Timezone: 時區
|
Timezone: 時區
|
||||||
title: 標題
|
title: 標題
|
||||||
Title: 標題
|
Title: 標題
|
||||||
|
To join the domain, users can click the "Join Domain" button on "My Domain" page.: 要加入域,用戶可以點擊“我的域”頁面中的“加入域”按鈕。
|
||||||
Toggle Pretest Panel: 切換自測面板
|
Toggle Pretest Panel: 切換自測面板
|
||||||
Toggle Records Panel: 切換評測記錄面板
|
Toggle Records Panel: 切換評測記錄面板
|
||||||
Total Score: 總分
|
Total Score: 總分
|
||||||
@@ -510,6 +512,7 @@ User-defined role: 使用者定義的角色
|
|||||||
User: 使用者
|
User: 使用者
|
||||||
Username / UID: 使用者名或 UID
|
Username / UID: 使用者名或 UID
|
||||||
Username: 使用者名
|
Username: 使用者名
|
||||||
|
Users will have to manually join the domain first before selected roles can be applied.: 用戶需要先手動加入域才能應用此角色分配。
|
||||||
Users with those roles will be removed from the domain.: 擁有這些角色的使用者將從此域中移除。
|
Users with those roles will be removed from the domain.: 擁有這些角色的使用者將從此域中移除。
|
||||||
Users: 使用者
|
Users: 使用者
|
||||||
Using your {0} universal account: 使用您的 {0} 通用賬戶
|
Using your {0} universal account: 使用您的 {0} 通用賬戶
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import UserSelectAutoComplete from 'vj/components/autocomplete/UserSelectAutoComplete';
|
import UserSelectAutoComplete from 'vj/components/autocomplete/UserSelectAutoComplete';
|
||||||
import { ActionDialog, ConfirmDialog } from 'vj/components/dialog';
|
import { ActionDialog, ConfirmDialog, InfoDialog } from 'vj/components/dialog';
|
||||||
import Notification from 'vj/components/notification';
|
import Notification from 'vj/components/notification';
|
||||||
import { NamedPage } from 'vj/misc/Page';
|
import { NamedPage } from 'vj/misc/Page';
|
||||||
import {
|
import {
|
||||||
@@ -9,6 +9,20 @@ import {
|
|||||||
} from 'vj/utils';
|
} from 'vj/utils';
|
||||||
|
|
||||||
const page = new NamedPage('domain_user', () => {
|
const page = new NamedPage('domain_user', () => {
|
||||||
|
$('.not-joined').data('tooltip', i18n('Click to view detailed instructions.'));
|
||||||
|
$('.not-joined').addClass('text-orange');
|
||||||
|
$(document).on('click', '.not-joined', () => {
|
||||||
|
new InfoDialog({
|
||||||
|
$body: tpl`
|
||||||
|
<div class="typo">
|
||||||
|
<p>${i18n('Users will have to manually join the domain first before selected roles can be applied.')}</p>
|
||||||
|
<p>${i18n('To join the domain, users can click the "Join Domain" button on "My Domain" page.')}</p>
|
||||||
|
<p>${i18n('Or use the following link:')}</p>
|
||||||
|
<p><a href="/domain/join?target=${UiContext.domain._id}">/domain/join?target=${UiContext.domain._id}</a></p>
|
||||||
|
</div>`,
|
||||||
|
}).open();
|
||||||
|
});
|
||||||
|
|
||||||
const addUserSelector = UserSelectAutoComplete.getOrConstruct($('.dialog__body--add-user [name="user"]'));
|
const addUserSelector = UserSelectAutoComplete.getOrConstruct($('.dialog__body--add-user [name="user"]'));
|
||||||
const addUserDialog = new ActionDialog({
|
const addUserDialog = new ActionDialog({
|
||||||
$body: $('.dialog__body--add-user > div'),
|
$body: $('.dialog__body--add-user > div'),
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
{% set is_disabled=(rudoc._id == handler.user._id) %}
|
{% set is_disabled=(rudoc._id == handler.user._id) %}
|
||||||
<input type="checkbox" data-uid="{{udoc._id}}" data-checkbox-group="user" {% if is_disabled %}disabled{% else %}data-checkbox-range{% endif %}>
|
<input type="checkbox" data-uid="{{udoc._id}}" data-checkbox-group="user" {% if is_disabled %}disabled{% else %}data-checkbox-range{% endif %}>
|
||||||
[{{udoc._id}}]{{ user.render_inline(udoc, avatar=false, badge=false) }}{% if not udoc.join %}
|
[{{udoc._id}}]{{ user.render_inline(udoc, avatar=false, badge=false) }}{% if not udoc.join %}
|
||||||
<span class="text-orange">({{ _('Not joined yet') }})</span>
|
<span class="not-joined">({{ _('Not joined yet') }})</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</div></td>
|
</div></td>
|
||||||
|
|||||||
@@ -26,6 +26,9 @@
|
|||||||
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||||
<li class="menu__item"><a class="menu__link" href="javascript:showSignInDialog();">
|
<li class="menu__item"><a class="menu__link" href="javascript:showSignInDialog();">
|
||||||
<span class="icon icon-add"></span> {{ _('Login to Create a Discussion') }}</a></li>
|
<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="/domain/join?target={{ pdoc.domainId }}">
|
||||||
|
<span class="icon icon-add"></span> {{ _('Join Domain to Create a Discussion') }}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="menu__item"><a class="menu__link disabled" href="javascript:;">
|
<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>
|
<span class="icon icon-add"></span> {{ _('No Permission to Create a Discussion') }}</a></li>
|
||||||
@@ -51,6 +54,9 @@
|
|||||||
<a class="menu__link" href="javascript:showSignInDialog()">
|
<a class="menu__link" href="javascript:showSignInDialog()">
|
||||||
<span class="icon icon-add"></span> {{ _('Login to Attend Contest') }}
|
<span class="icon icon-add"></span> {{ _('Login to Attend Contest') }}
|
||||||
</a>
|
</a>
|
||||||
|
{% elif not handler.user._dudoc.join %}
|
||||||
|
<li class="menu__item"><a class="menu__link" href="/domain/join?target={{ pdoc.domainId }}">
|
||||||
|
<span class="icon icon-add"></span> {{ _('Join Domain to Attend Contest') }}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="menu__link disabled" href="javascript:;">
|
<a class="menu__link disabled" href="javascript:;">
|
||||||
<span class="icon icon-add"></span> {{ _('No Permission to Attend Contest') }}
|
<span class="icon icon-add"></span> {{ _('No Permission to Attend Contest') }}
|
||||||
|
|||||||
@@ -35,6 +35,10 @@
|
|||||||
<a class="menu__link" href="javascript:showSignInDialog()">
|
<a class="menu__link" href="javascript:showSignInDialog()">
|
||||||
<span class="icon icon-add"></span> {{ _('Login to Claim Homework') }}
|
<span class="icon icon-add"></span> {{ _('Login to Claim Homework') }}
|
||||||
</a>
|
</a>
|
||||||
|
{% elif not handler.user._dudoc.join %}
|
||||||
|
<a class="menu__link" href="/domain/join?target={{ tdoc.domainId }}">
|
||||||
|
<span class="icon icon-add"></span> {{ _('Join Domain to Claim Homework') }}
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="menu__link disabled" href="javascript:;">
|
<a class="menu__link disabled" href="javascript:;">
|
||||||
<span class="icon icon-add"></span> {{ _('No Permission to Claim Homework') }}
|
<span class="icon icon-add"></span> {{ _('No Permission to Claim Homework') }}
|
||||||
|
|||||||
Reference in new issue
Block a user