diff --git a/packages/ui-default/templates/components/user.html b/packages/ui-default/templates/components/user.html index 97697b2c0..61f9706ee 100644 --- a/packages/ui-default/templates/components/user.html +++ b/packages/ui-default/templates/components/user.html @@ -18,7 +18,7 @@ {% endif %} {% if levelbadge and udoc.level %} {% set level = udoc.level %} - LV {{ level }} + {{ _('LV '+ level) }} {% endif %} {% if modbadge %} {% if udoc.hasPriv(PRIV.PRIV_MOD_BADGE) %} diff --git a/packages/ui-default/templates/partials/manage_user_priv.html b/packages/ui-default/templates/partials/manage_user_priv.html index 9c121ed41..4443e655e 100644 --- a/packages/ui-default/templates/partials/manage_user_priv.html +++ b/packages/ui-default/templates/partials/manage_user_priv.html @@ -1,4 +1,21 @@ {% import "components/user.html" as user with context %} + +{% macro show_priv(upriv) %} +{%- if upriv == 0 -%} + PRIV_NONE +{%- elif upriv == -1 -%} + PRIV_ALL +{%- else -%} + {%- for name, priv in Priv -%} + {%- if priv|bitand(upriv) and not priv|bitand(defaultPriv) -%} +
+{{ name }}
+ {%- elif priv|bitand(defaultPriv) and not priv|bitand(upriv) -%} +-{{ name }}
+ {%- endif -%} + {%- endfor -%} +{%- endif -%} +{% endmacro %} ++{{ name }}
- {%- elif priv|bitand(defaultPriv) and not priv|bitand(udoc.priv) -%} --{{ name }}
- {%- endif -%} - {%- endfor -%} - {%- endif -%} -