1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-12 05:39:02 +09:00

Move "Permissions" row into main table in /admin/accounts/:id (#5734)

This commit is contained in:
unarist 2017-11-17 23:18:20 +09:00 committed by Eugen Rochko
parent dc6e031364
commit e28b33c89c

View File

@ -15,6 +15,12 @@
%td= @account.display_name %td= @account.display_name
- if @account.local? - 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 %tr
%th= t('admin.accounts.email') %th= t('admin.accounts.email')
%td %td
@ -145,20 +151,6 @@
%th= t('admin.accounts.followers_url') %th= t('admin.accounts.followers_url')
%td= link_to @account.followers_url, @account.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 %hr
%h3= t('admin.accounts.moderation_notes') %h3= t('admin.accounts.moderation_notes')