Commit d1a5e370 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

show mail-to and block buttons on /admin/users/:id page

parent 963c212b
...@@ -17,6 +17,17 @@ ...@@ -17,6 +17,17 @@
%small member since #{@admin_user.created_at.stamp("Nov 12, 2031")} %small member since #{@admin_user.created_at.stamp("Nov 12, 2031")}
.clearfix .clearfix
%hr %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 %h5
Add User to Projects Add User to Projects
%small %small
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment