summaryrefslogtreecommitdiff
path: root/app/views/users/show.html.haml
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2015-09-28 16:00:53 +0200
committerrymai <remy@rymai.me>2015-09-29 21:11:51 +0200
commit5f95a5e070c76c582a2b394377b0f350f4b1cff9 (patch)
tree94ae75916155f0337b8981cab1d04e563c8e24af /app/views/users/show.html.haml
parent10c036fcf59297663fd1121f7b48d1a289a2e312 (diff)
downloadgitlab-ce-5f95a5e070c76c582a2b394377b0f350f4b1cff9.tar.gz
Disable the "Report abuse" button if a user has already been reported
Diffstat (limited to 'app/views/users/show.html.haml')
-rw-r--r--app/views/users/show.html.haml18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 37d5dba0330..0661d8d06a2 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -19,14 +19,18 @@
= icon('user')
Profile settings
- elsif current_user
- .pull-right
+ #report_abuse.pull-right
%span.dropdown
- %a.light.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"}
- = icon('exclamation-circle')
- %ul.dropdown-menu.dropdown-menu-right
- %li
- = link_to new_abuse_report_path(user_id: @user.id) do
- Report abuse
+ - if @user.abuse_report
+ %span.light.dropdown-toggle.btn.btn-sm.btn-close{title: abuse_report_button_title(@user)}
+ = icon('exclamation-circle')
+ - else
+ %a.light.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"}
+ = icon('exclamation-circle')
+ %ul.dropdown-menu.dropdown-menu-right
+ %li
+ = link_to new_abuse_report_path(user_id: @user.id), title: abuse_report_button_title(@user) do
+ Report abuse
.username
@#{@user.username}