about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:22:59 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:22:59 +0100
commitf978b06dd188fef4c2ece5e787818579b663ddf8 (patch)
tree70a0969b208ac3b0393c5fb9e54b8bd222782e6f /app/views
parentf406e01fcf7d69045cf3ad8ea8dea51acd85535b (diff)
Add suspend account functionality to admin UI
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/accounts/index.html.haml7
-rw-r--r--app/views/admin/accounts/show.html.haml2
2 files changed, 9 insertions, 0 deletions
diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml
index a074f0ad9..a2a3628d6 100644
--- a/app/views/admin/accounts/index.html.haml
+++ b/app/views/admin/accounts/index.html.haml
@@ -2,6 +2,7 @@
   %li= link_to 'Local', admin_accounts_path(local: '1')
   %li= link_to 'Remote', admin_accounts_path(remote: '1')
   %li= link_to 'Silenced', admin_accounts_path(silenced: '1')
+  %li= link_to 'Suspended', admin_accounts_path(suspended: '1')
   %li= link_to 'Most recent', admin_accounts_path(recent: '1')
 
 %table.table
@@ -11,6 +12,7 @@
       %th Domain
       %th Subscribed
       %th Silenced
+      %th Suspended
       %th
   %tbody
     - @accounts.each do |account|
@@ -31,6 +33,11 @@
             %i.fa.fa-check
           - else
             %i.fa.fa-times
+        %td
+          - if account.suspended?
+            %i.fa.fa-check
+          - else
+            %i.fa.fa-times
         %td= link_to 'Edit', admin_account_path(account.id)
 
 = will_paginate @accounts, pagination_options
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 47f1e2308..de63dd7f9 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -33,3 +33,5 @@
 
   .actions
     = f.button :button, t('generic.save_changes'), type: :submit
+
+= link_to 'Perform full suspension', suspend_admin_account_path(@account.id), method: :post, data: { confirm: 'Are you sure?' }, class: 'button'