mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: allow extra user private & public fields (#1059)
This commit is contained in:
1 parent
8f2c5a17cd
commit
3a25e4e53f
11 files changed
+61
-46
No files matched your search
@@ -5,7 +5,7 @@
|
||||
<img class="small user-profile-avatar v-center" loading="lazy" src="{{ avatarUrl(udoc.avatar|default('')) }}" width="20" height="20">
|
||||
{% endif %}
|
||||
<a class="user-profile-name uname--lv{{ udoc.level|default(0) }}" href="{{ url('user_detail', uid=udoc._id) }}">
|
||||
{% if handler.user.hasPerm(perm.PERM_VIEW_DISPLAYNAME) and udoc.displayName and udoc.displayName != udoc.uname %}
|
||||
{% if handler.user.hasPerm(perm.PERM_VIEW_USER_PRIVATE_INFO) and udoc.displayName and udoc.displayName != udoc.uname %}
|
||||
{{ udoc.displayName }} ({{ udoc.uname }})
|
||||
{% else %}
|
||||
{{ udoc.uname }}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
</li>
|
||||
<ul class="enroll_user_menu">
|
||||
{%- for uid, udoc in udict -%}
|
||||
<li class="menu__item enroll_user_menu_item" data-uid="{{ uid }}" data-uname="{{ udoc.uname }}" {% if handler.user.hasPerm(perm.PERM_VIEW_DISPLAYNAME) and udoc.displayName %}data-displayname="{{ udoc.displayName }}"{% endif %}>
|
||||
<li class="menu__item enroll_user_menu_item" data-uid="{{ uid }}" data-uname="{{ udoc.uname }}" {% if handler.user.hasPerm(perm.PERM_VIEW_USER_PRIVATE_INFO) and udoc.displayName %}data-displayname="{{ udoc.displayName }}"{% endif %}>
|
||||
<a href="./{{ tdoc._id }}?uid={{ uid }}" class="menu__link{% if (handler.request.query.uid or handler.user._id) == uid %} active{% endif %}">
|
||||
<span class="user-profile-link">
|
||||
<img class="small user-profile-avatar v-center" loading="lazy" src="{{ avatarUrl(udoc.avatar|default('')) }}" width="20" height="20">
|
||||
<span class="user-profile-name">
|
||||
{% if handler.user.hasPerm(perm.PERM_VIEW_DISPLAYNAME) and udoc.displayName and udoc.displayName != udoc.uname %}
|
||||
{% if handler.user.hasPerm(perm.PERM_VIEW_USER_PRIVATE_INFO) and udoc.displayName and udoc.displayName != udoc.uname %}
|
||||
{{ udoc.displayName }} ({{ udoc.uname }})
|
||||
{% else %}
|
||||
{{ udoc.uname }}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="media__body profile-header__main">
|
||||
<h1>
|
||||
{{ udoc['uname'] }}
|
||||
{% if handler.user.hasPerm(perm.PERM_VIEW_DISPLAYNAME) and udoc.displayName %}<small>({{ udoc['displayName'] }})</small>{% endif %}
|
||||
{% if handler.user.hasPerm(perm.PERM_VIEW_USER_PRIVATE_INFO) and udoc.displayName %}<small>({{ udoc['displayName'] }})</small>{% endif %}
|
||||
</h1>
|
||||
<p>
|
||||
{{ _('UID') }}: {{ udoc['_id'] }},
|
||||
|
||||
Reference in new issue
Block a user