Commit 00a68c3c authored by Robert Speicher's avatar Robert Speicher

Remove Block Button from Abuse Reports page if User is Already Blocked

An addition to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2292

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/4667

See merge request !2313
parents 99eb6470 e16d9edf
......@@ -23,6 +23,9 @@
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"
- else
.btn.btn-xs
Already Blocked
= link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment