diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/accounts_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/statuses_helper.rb | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb index c9e95d8d8..1a5f22e2a 100644 --- a/app/helpers/accounts_helper.rb +++ b/app/helpers/accounts_helper.rb @@ -64,14 +64,16 @@ module AccountsHelper content_tag(:div, content_tag(:div, t('accounts.roles.bot'), class: 'account-role bot'), class: 'roles') elsif account.group? content_tag(:div, content_tag(:div, t('accounts.roles.group'), class: 'account-role group'), class: 'roles') - elsif (Setting.show_staff_badge && account.user_staff?) || all + elsif (Setting.show_staff_badge && account.user_can_moderate?) || all content_tag(:div, class: 'roles') do - if all && !account.user_staff? + if all && !account.user_can_moderate? content_tag(:div, t('admin.accounts.roles.user'), class: 'account-role') elsif account.user_admin? content_tag(:div, t('accounts.roles.admin'), class: 'account-role admin') elsif account.user_moderator? content_tag(:div, t('accounts.roles.moderator'), class: 'account-role moderator') + elsif account.user_halfmod? + content_tag(:div, t('accounts.roles.halfmod'), class: 'account-role halfmod') end end end diff --git a/app/helpers/statuses_helper.rb b/app/helpers/statuses_helper.rb index d122a2860..574b3ad5c 100644 --- a/app/helpers/statuses_helper.rb +++ b/app/helpers/statuses_helper.rb @@ -56,13 +56,15 @@ module StatusesHelper roles << content_tag(:div, t('accounts.roles.gently'), class: 'account-role gently') if account.gently? roles << content_tag(:div, t('accounts.roles.kobold'), class: 'account-role kobold') if account.kobold? - if (Setting.show_staff_badge && account.user_staff?) || all + if (Setting.show_staff_badge && account.user_can_moderate?) || all if all && !account.user_staff? roles << content_tag(:div, t('admin.accounts.roles.user'), class: 'account-role') elsif account.user_admin? roles << content_tag(:div, t('accounts.roles.admin'), class: 'account-role admin') elsif account.user_moderator? roles << content_tag(:div, t('accounts.roles.moderator'), class: 'account-role moderator') + elsif account.user_halfmod? + roles << content_tag(:div, t('accounts.roles.halfmod'), class: 'account-role halfmod') end end |