about summary refs log tree commit diff
path: root/app/views/admin
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-01-23 14:31:31 +0100
committerEugen Rochko <eugen@zeonfederated.com>2018-01-23 14:31:31 +0100
commit4ec9d8b4d9b58766b7356d3173e9cdebf2dbae15 (patch)
treead81ff74fa9a6193e00fe1b6d67d3ca0cbc0b33c /app/views/admin
parentd966878e8723dd029b9c5abad3d55e917f78d46f (diff)
Display deleted users' role as “Suspended” (#6339)
Follow-up to 6eb60260b1b771e8cd42d3b58b82b2781a067991 which missed a spot where
the same error occurs.
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/accounts/show.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 5f5d0995c..dbbf5fc09 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -18,7 +18,10 @@
         %tr
           %th= t('admin.accounts.role')
           %td
-            = t("admin.accounts.roles.#{@account.user&.role}")
+            - if @account.user.nil?
+              = t("admin.accounts.moderation.suspended")
+            - else
+              = t("admin.accounts.roles.#{@account.user&.role}")
             = table_link_to 'angle-double-up', t('admin.accounts.promote'), promote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:promote, @account.user)
             = table_link_to 'angle-double-down', t('admin.accounts.demote'), demote_admin_account_role_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:demote, @account.user)
         %tr