diff --git a/vj4/locale/zh_CN.yaml b/vj4/locale/zh_CN.yaml index 6b22cc73b..e192c6e44 100644 --- a/vj4/locale/zh_CN.yaml +++ b/vj4/locale/zh_CN.yaml @@ -636,3 +636,7 @@ Lucky: 手气不错 Pick a problem randomly based on current filter: 根据当前过滤条件随机选择一道题 No problem.: 没有题目。 Initialize: 初始化 +Background Image: 背景图片 +'{} is a moderator of this domain.': '{}是这个域的管理者之一。' +He: 他 +She: 她 diff --git a/vj4/model/adaptor/setting.py b/vj4/model/adaptor/setting.py index ae0e1b29e..ca81d783d 100644 --- a/vj4/model/adaptor/setting.py +++ b/vj4/model/adaptor/setting.py @@ -32,6 +32,8 @@ desc='If left blank, the built-in template of the corresponding language will be used.')] ACCOUNT_SETTINGS = [ + Setting('setting_info', 'background_img', int, range=constant.setting.BACKGROUND_RANGE, + ui='select', name='Background Image'), Setting('setting_info', 'gravatar', str, name='Gravatar Email', desc='We use Gravatar to present your avatar icon.'), Setting('setting_info', 'qq', str, diff --git a/vj4/ui/constant/setting.js b/vj4/ui/constant/setting.js index a2a919d65..6b3e0ec44 100644 --- a/vj4/ui/constant/setting.js +++ b/vj4/ui/constant/setting.js @@ -15,3 +15,28 @@ export const FUNCTION_RANGE = { 1: 'Enabled', }; attachObjectMeta(FUNCTION_RANGE, 'intKey', true); + +export const BACKGROUND_RANGE = { + 1: '1', + 2: '2', + 3: '3', + 4: '4', + 5: '5', + 6: '6', + 7: '7', + 8: '8', + 9: '9', + 10: '10', + 11: '11', + 12: '12', + 13: '13', + 14: '14', + 15: '15', + 16: '16', + 17: '17', + 18: '18', + 19: '19', + 20: '20', + 21: '21', +}; +attachObjectMeta(BACKGROUND_RANGE, 'intKey', true); diff --git a/vj4/ui/templates/discussion_detail.html b/vj4/ui/templates/discussion_detail.html index 0a73452d8..454216247 100644 --- a/vj4/ui/templates/discussion_detail.html +++ b/vj4/ui/templates/discussion_detail.html @@ -39,7 +39,7 @@ {% endif %}
  • - {{ _('Report') }} + {{ _('Report') }}
  • @@ -70,16 +70,17 @@

    {{ _('{0} comments').format(drcount) }}

    + {% with udoc = udict[ddoc['owner_uid']] %}
    - +
    @@ -106,6 +107,7 @@

    {{ _('{0} comments').format(drcount) }}

    + {% endwith %} {% if vnode['doc_type'] == vj4.model.document.TYPE_PROBLEM %} {% with pdoc=vnode, owner_udoc=udict[vnode['owner_uid']] %} diff --git a/vj4/ui/templates/user_detail.html b/vj4/ui/templates/user_detail.html index 1b245454a..065de59c9 100644 --- a/vj4/ui/templates/user_detail.html +++ b/vj4/ui/templates/user_detail.html @@ -4,7 +4,7 @@
    -