about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-11-17 23:18:20 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-11-17 15:18:20 +0100
commite28b33c89c9a4c6baa79cedb5d6db1ed612710af (patch)
tree980732e79cb4e1c098df55d7c38dc542d395fc27 /app
parentdc6e031364d1f47a49ea47f20070a4e9986a4c68 (diff)
Move "Permissions" row into main table in /admin/accounts/:id (#5734)
Diffstat (limited to 'app')
-rw-r--r--app/views/admin/accounts/show.html.haml20
1 files changed, 6 insertions, 14 deletions
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index f49594828..ddb1cf15d 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -16,6 +16,12 @@
 
       - if @account.local?
         %tr
+          %th= t('admin.accounts.role')
+          %td
+            = 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
           %th= t('admin.accounts.email')
           %td
             = @account.user_email
@@ -145,20 +151,6 @@
           %th= t('admin.accounts.followers_url')
           %td= link_to @account.followers_url, @account.followers_url
 
-- else
-  %hr
-
-  .table-wrapper
-    %table.table
-      %tbody
-        %tr
-          %th= t('admin.accounts.role')
-          %td
-            = t("admin.accounts.roles.#{@account.user&.role}")
-          %td<
-            = 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)
-
 %hr
 %h3= t('admin.accounts.moderation_notes')