summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelvin <kelvin@gitlab.com>2016-01-06 14:41:26 +0300
committerKelvin <kelvin@gitlab.com>2016-01-06 14:41:26 +0300
commit987989b632d4f610f0ec17b65f1c7d24530c99ff (patch)
treecb6797bec5e319e32d76882e7d0778a1565e6a62
parentf6b61d1948f99039a5087ac8f49ad390a4a6565a (diff)
downloadgitlab-ce-987989b632d4f610f0ec17b65f1c7d24530c99ff.tar.gz
Remove block button on abuse reports if user is already blocked
-rw-r--r--app/views/admin/abuse_reports/_abuse_report.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml
index cf50a376e11..8aa34c0ffac 100644
--- a/app/views/admin/abuse_reports/_abuse_report.html.haml
+++ b/app/views/admin/abuse_reports/_abuse_report.html.haml
@@ -23,6 +23,6 @@
data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, remote: true, method: :delete, class: "btn btn-xs btn-remove js-remove-tr"
%td
- - if user
+ - if user && !user.blocked?
= link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs"
= link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"