about summary refs log tree commit diff
path: root/app/views/admin/accounts/show.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-02-18 14:59:46 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-02-18 14:59:46 +0100
commit3a8cb6c73715919a61709bd7ce67fc5ec8d192f9 (patch)
tree5ae1c56fa11abd270df1f2d70215d45e6f11bae9 /app/views/admin/accounts/show.html.haml
parent6840a77711b2d536b9227b5a96ec565117d80205 (diff)
Add quick link from admin account view to block/unblock instance (#10073)
Diffstat (limited to 'app/views/admin/accounts/show.html.haml')
-rw-r--r--app/views/admin/accounts/show.html.haml6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 280a834ba..7ac73bd07 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -166,6 +166,12 @@
       - 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?