diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-13 07:04:23 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-13 13:04:23 +0200 |
commit | 3a9eb81a8006af0306e8abc54bd8aca8381eee25 (patch) | |
tree | 9bae0b991f7db4cfe0de626829995346cdb29549 /app/views/admin/accounts | |
parent | 0e39cc6a35661416a1f1ccb8841863f7bf307020 (diff) |
Admin accounts controller cleanup (#1664)
* Remove unused account_params method in admin/accounts controller * Introduce AccountFilter to find accounts * Use AccountFilter in admin/accounts controller * Use more restful routes admin silence and suspension area * Add admin/silences and admin/suspensions controllers
Diffstat (limited to 'app/views/admin/accounts')
-rw-r--r-- | app/views/admin/accounts/show.html.haml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index ba1c3bae7..22901aed1 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -62,11 +62,11 @@ = number_to_human_size @account.media_attachments.sum('file_file_size') - if @account.silenced? - = link_to 'Undo silence', unsilence_admin_account_path(@account.id), method: :post, class: 'button' + = link_to 'Undo silence', admin_account_silence_path(@account.id), method: :delete, class: 'button' - else - = link_to 'Silence', silence_admin_account_path(@account.id), method: :post, class: 'button' + = link_to 'Silence', admin_account_silence_path(@account.id), method: :post, class: 'button' - if @account.suspended? - = link_to 'Undo suspension', unsuspend_admin_account_path(@account.id), method: :post, class: 'button' + = link_to 'Undo suspension', admin_account_suspension_path(@account.id), method: :delete, class: 'button' - else - = link_to 'Perform full suspension', suspend_admin_account_path(@account.id), method: :post, data: { confirm: 'Are you sure?' }, class: 'button' + = link_to 'Perform full suspension', admin_account_suspension_path(@account.id), method: :post, data: { confirm: 'Are you sure?' }, class: 'button' |