From d1a5e370f36d246ee9488a9043ea652118302849 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Mar 2013 23:15:39 +0200 Subject: [PATCH] show mail-to and block buttons on /admin/users/:id page --- app/views/admin/users/show.html.haml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 2129ceec..b813f859 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -17,6 +17,17 @@ %small member since #{@admin_user.created_at.stamp("Nov 12, 2031")} .clearfix %hr + %p + %span.btn.btn-small + %i.icon-envelope + = mail_to @admin_user.email + - unless @admin_user == current_user + - if @admin_user.blocked? + = link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn btn-small success" + - else + = 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" + = 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" + %hr %h5 Add User to Projects %small