Commit 6404d697 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Better UX for blocked users in admin area

parent e9142c6f
%h3.page-title %h3.page-title
User: %span.cgray User:
= @user.name = @user.name
- if @user.blocked? - if @user.blocked?
%span.cred (Blocked) %span.cred (Blocked)
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
= link_to edit_admin_user_path(@user), class: "btn grouped" do = link_to edit_admin_user_path(@user), class: "btn grouped" do
%i.icon-edit %i.icon-edit
Edit Edit
- if @user.blocked?
= link_to 'Unblock', unblock_admin_user_path(@user), method: :put, class: "btn grouped success"
%hr %hr
.row .row
...@@ -67,17 +65,30 @@ ...@@ -67,17 +65,30 @@
= link_to @user.created_by.name, [:admin, @user.created_by] = link_to @user.created_by.name, [:admin, @user.created_by]
- unless @user == current_user - unless @user == current_user
.alert - if @user.blocked?
%h4 Block user .alert.alert-info
%br %h4 This user is blocked
%p Blocking user has the following effects: %br
%ul %p Blocking user has the following effects:
%li User will not be able to login %ul
%li User will not be able to access git repositories %li User will not be able to login
%li User will be removed from joined projects and groups %li User will not be able to access git repositories
%li Personal projects will be left %li User will be removed from joined projects and groups
%li Owned groups will be left %li Personal projects will be left
= link_to 'Block user', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-remove" %li Owned groups will be left
= link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", confirm: 'Are you sure?'
- else
.alert
%h4 Block this user
%br
%p Blocking user has the following effects:
%ul
%li User will not be able to login
%li User will not be able to access git repositories
%li User will be removed from joined projects and groups
%li Personal projects will be left
%li Owned groups will be left
= link_to 'Block user', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-remove"
.alert.alert-error .alert.alert-error
%h4 %h4
......
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