mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: custom badge
This commit is contained in:
1 parent
255fba8339
commit
4bc8ba9af3
5 files changed
+86
-80
No files matched your search
@@ -12,8 +12,14 @@
|
||||
{% endif %}
|
||||
</a>
|
||||
{% if badge %}
|
||||
{% set level = udoc.level|default(0) %}
|
||||
<a class="user-profile-badge v-center badge--lv{{ level }}" href="{{ url('user_detail', uid=udoc._id) }}" data-tooltip="LV {{ level }}: Top {{ model.builtin.LEVELS[level]|default('N/A') }}%">LV {{ level }}</a>
|
||||
{% if udoc.badge %}
|
||||
{% set _badge = udoc.badge.split('#') %}
|
||||
<span class="user-profile-badge v-center" style="background-color:#{{ _badge[1] }}{% if _badge[2] %};color:#{{ _badge[2] }}{% endif %}">{{ _badge[0] }}</span>
|
||||
{% endif %}
|
||||
{% if udoc.level %}
|
||||
{% set level = udoc.level %}
|
||||
<a class="user-profile-badge v-center badge--lv{{ level }}" href="{{ url('user_detail', uid=udoc._id) }}" data-tooltip="LV {{ level }}: Top {{ model.builtin.LEVELS[level]|default('N/A') }}%">LV {{ level }}</a>
|
||||
{% endif %}
|
||||
{% if modbadge %}
|
||||
{% if udoc.hasPriv(PRIV.PRIV_MOD_BADGE) %}
|
||||
<span class="user-profile-badge v-center badge--su" data-tooltip="{{ _('SuperUser') }}">SU</span>
|
||||
|
||||
Reference in new issue
Block a user