]> cat aescling's git repositories - mastodon.git/commitdiff
Add quick link from admin account view to block/unblock instance (#10073)
authorThibG <thib@sitedethib.com>
Mon, 18 Feb 2019 13:59:46 +0000 (14:59 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 18 Feb 2019 13:59:46 +0000 (14:59 +0100)
app/views/admin/accounts/show.html.haml

index 280a834ba268d0ae2da9b188f1ee1b77dffe2c6c..7ac73bd072542396f264495a4f02c42f34f0de97 100644 (file)
       - else
         = link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@account.id, type: 'suspend'), class: 'button button--destructive' if can?(:suspend, @account)
 
+      - unless @account.local?
+        - if DomainBlock.where(domain: @account.domain).exists?
+          = link_to t('admin.domain_blocks.undo'), admin_instance_path(@account.domain), class: 'button'
+        - else
+          = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @account.domain), class: 'button button--destructive'
+
   %hr.spacer/
 
   - unless @warnings.empty?