diff options
author | Rémy Coutable <remy@rymai.me> | 2015-09-29 18:08:55 +0200 |
---|---|---|
committer | rymai <remy@rymai.me> | 2015-09-29 21:47:01 +0200 |
commit | ea72d53ec083676ee1171e97c0869132f360d0c9 (patch) | |
tree | d512e83b668cf9223bab25c5f5dd6b715a82b204 /app/views/users/show.html.haml | |
parent | 5f95a5e070c76c582a2b394377b0f350f4b1cff9 (diff) | |
download | gitlab-ce-ea72d53ec083676ee1171e97c0869132f360d0c9.tar.gz |
Streamline the "Report button"rymai/gitlab-ce-disable-report-button-if-already-reported
This simplifies the "Report button" to not use open a dropdown and
adds a tooltip on this button.
This also removes an extra spec and adds missing specs.
Diffstat (limited to 'app/views/users/show.html.haml')
-rw-r--r-- | app/views/users/show.html.haml | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 0661d8d06a2..11beb3e3239 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -19,18 +19,13 @@ = icon('user') Profile settings - elsif current_user - #report_abuse.pull-right - %span.dropdown - - 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 + .report_abuse.pull-right + - if @user.abuse_report + %span#report_abuse_btn.light.btn.btn-sm.btn-close{title: 'Already reported for abuse', data: {toggle: 'tooltip', placement: 'right', container: 'body'}} + = icon('exclamation-circle') + - else + %a.light.btn.btn-sm{href: new_abuse_report_path(user_id: @user.id), title: 'Report abuse', data: {toggle: 'tooltip', placement: 'right', container: 'body'}} + = icon('exclamation-circle') .username @#{@user.username} |