about summary refs log tree commit diff
path: root/app/helpers/stream_entries_helper.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-11-27 16:26:18 +0100
committerGitHub <noreply@github.com>2018-11-27 16:26:18 +0100
commit33be091f506242b136b0d4a65cf06a0babc4d757 (patch)
tree0f9f6e40e40f4ecabfa1e5f906000abe756f42a9 /app/helpers/stream_entries_helper.rb
parent6b6e633c095485f95350c4308a942192e5fe8806 (diff)
parent55edfd6e0e1cb5377f0c3406d94ddfd84ddb7b20 (diff)
Merge pull request #828 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers/stream_entries_helper.rb')
-rw-r--r--app/helpers/stream_entries_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb
index ac655f622..033d435c4 100644
--- a/app/helpers/stream_entries_helper.rb
+++ b/app/helpers/stream_entries_helper.rb
@@ -34,12 +34,14 @@ module StreamEntriesHelper
     end
   end
 
-  def account_badge(account)
+  def account_badge(account, all: false)
     if account.bot?
       content_tag(:div, content_tag(:div, t('accounts.roles.bot'), class: 'account-role bot'), class: 'roles')
-    elsif Setting.show_staff_badge && account.user_staff?
+    elsif (Setting.show_staff_badge && account.user_staff?) || all
       content_tag(:div, class: 'roles') do
-        if account.user_admin?
+        if all && !account.user_staff?
+          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')