diff options
author | Robert Speicher <robert@gitlab.com> | 2016-01-09 01:02:34 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-01-09 01:02:34 +0300 |
commit | 00a68c3cb0e7b626a884a3f5c291a7c2c821ebee (patch) | |
tree | 17d75975945d1b4bb8c61d258aee352c189f9f9b /app | |
parent | 99eb6470878724452191b35c143275b49ae9f87d (diff) | |
parent | e16d9edf9995735da7a900c35bc7be73cc481473 (diff) |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/views/admin/abuse_reports/_abuse_report.html.haml | 5 |
1 files changed, 4 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..853a780c576 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -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" |