Commit d47fb275 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix block/remove UI for admin::users#show page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9939c04e
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
- if @user.blocked? - if @user.blocked?
.alert.alert-info .alert.alert-info
%h4 This user is blocked %h4 This user is blocked
%br
%p Blocking user has the following effects: %p Blocking user has the following effects:
%ul %ul
%li User will not be able to login %li User will not be able to login
...@@ -86,11 +85,11 @@ ...@@ -86,11 +85,11 @@
%li User will be removed from joined projects and groups %li User will be removed from joined projects and groups
%li Personal projects will be left %li Personal projects will be left
%li Owned groups will be left %li Owned groups will be left
%br
= link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' } = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' }
- else - else
.alert .alert.alert-warning
%h4 Block this user %h4 Block this user
%br
%p Blocking user has the following effects: %p Blocking user has the following effects:
%ul %ul
%li User will not be able to login %li User will not be able to login
...@@ -98,12 +97,12 @@ ...@@ -98,12 +97,12 @@
%li User will be removed from joined projects and groups %li User will be removed from joined projects and groups
%li Personal projects will be left %li Personal projects will be left
%li Owned groups will be left %li Owned groups will be left
%br
= link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-remove" = link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-remove"
.alert.alert-danger .alert.alert-danger
%h4 %h4
Remove user Remove user
%br
%p Deleting a user has the following effects: %p Deleting a user has the following effects:
%ul %ul
%li All user content like authored issues, snippets, comments will be removed %li All user content like authored issues, snippets, comments will be removed
...@@ -114,6 +113,7 @@ ...@@ -114,6 +113,7 @@
%li %li
Next groups with all content will be removed: Next groups with all content will be removed:
%strong #{@user.solo_owned_groups.map(&:name).join(', ')} %strong #{@user.solo_owned_groups.map(&:name).join(', ')}
%br
= link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove" = link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
.col-md-6 .col-md-6
...@@ -150,5 +150,3 @@ ...@@ -150,5 +150,3 @@
- if tm.respond_to? :project - if tm.respond_to? :project
= link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do = link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do
%i.icon-remove %i.icon-remove
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