Commit d1a5e370f36d246ee9488a9043ea652118302849
1 parent
963c212b
Exists in
master
and in
4 other branches
show mail-to and block buttons on /admin/users/:id page
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
app/views/admin/users/show.html.haml
| ... | ... | @@ -17,6 +17,17 @@ |
| 17 | 17 | %small member since #{@admin_user.created_at.stamp("Nov 12, 2031")} |
| 18 | 18 | .clearfix |
| 19 | 19 | %hr |
| 20 | + %p | |
| 21 | + %span.btn.btn-small | |
| 22 | + %i.icon-envelope | |
| 23 | + = mail_to @admin_user.email | |
| 24 | + - unless @admin_user == current_user | |
| 25 | + - if @admin_user.blocked? | |
| 26 | + = link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn btn-small success" | |
| 27 | + - else | |
| 28 | + = link_to 'Block', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" | |
| 29 | + = link_to 'Destroy', [:admin, @admin_user], confirm: "USER #{@admin_user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove" | |
| 30 | + %hr | |
| 20 | 31 | %h5 |
| 21 | 32 | Add User to Projects |
| 22 | 33 | %small | ... | ... |