mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 13:46:11 +10:00
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
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user