]> cat aescling's git repositories - mastodon.git/commitdiff
Display deleted users' role as “Suspended” (#6339)
authorThibG <thib@sitedethib.com>
Tue, 23 Jan 2018 13:31:31 +0000 (14:31 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 23 Jan 2018 13:31:31 +0000 (14:31 +0100)
Follow-up to 6eb60260b1b771e8cd42d3b58b82b2781a067991 which missed a spot where
the same error occurs.

app/views/admin/accounts/show.html.haml

index 5f5d0995cde8dd7c5a1fb2fbc08b7700fd06d8d5..dbbf5fc092c28bf82b6ce6b43dfac13d6eb518a3 100644 (file)
         %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