Commit d47fb275ce85ce1a4b134cf7fe6d8e578d740518

Authored by Dmitriy Zaporozhets
1 parent 9939c04e

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

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 4 additions and 6 deletions   Show diff stats
app/views/admin/users/show.html.haml
@@ -78,7 +78,6 @@ @@ -78,7 +78,6 @@
78 - if @user.blocked? 78 - if @user.blocked?
79 .alert.alert-info 79 .alert.alert-info
80 %h4 This user is blocked 80 %h4 This user is blocked
81 - %br  
82 %p Blocking user has the following effects: 81 %p Blocking user has the following effects:
83 %ul 82 %ul
84 %li User will not be able to login 83 %li User will not be able to login
@@ -86,11 +85,11 @@ @@ -86,11 +85,11 @@
86 %li User will be removed from joined projects and groups 85 %li User will be removed from joined projects and groups
87 %li Personal projects will be left 86 %li Personal projects will be left
88 %li Owned groups will be left 87 %li Owned groups will be left
  88 + %br
89 = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' } 89 = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' }
90 - else 90 - else
91 - .alert 91 + .alert.alert-warning
92 %h4 Block this user 92 %h4 Block this user
93 - %br  
94 %p Blocking user has the following effects: 93 %p Blocking user has the following effects:
95 %ul 94 %ul
96 %li User will not be able to login 95 %li User will not be able to login
@@ -98,12 +97,12 @@ @@ -98,12 +97,12 @@
98 %li User will be removed from joined projects and groups 97 %li User will be removed from joined projects and groups
99 %li Personal projects will be left 98 %li Personal projects will be left
100 %li Owned groups will be left 99 %li Owned groups will be left
  100 + %br
101 = link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-remove" 101 = link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-remove"
102 102
103 .alert.alert-danger 103 .alert.alert-danger
104 %h4 104 %h4
105 Remove user 105 Remove user
106 - %br  
107 %p Deleting a user has the following effects: 106 %p Deleting a user has the following effects:
108 %ul 107 %ul
109 %li All user content like authored issues, snippets, comments will be removed 108 %li All user content like authored issues, snippets, comments will be removed
@@ -114,6 +113,7 @@ @@ -114,6 +113,7 @@
114 %li 113 %li
115 Next groups with all content will be removed: 114 Next groups with all content will be removed:
116 %strong #{@user.solo_owned_groups.map(&:name).join(', ')} 115 %strong #{@user.solo_owned_groups.map(&:name).join(', ')}
  116 + %br
117 = link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove" 117 = link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
118 118
119 .col-md-6 119 .col-md-6
@@ -150,5 +150,3 @@ @@ -150,5 +150,3 @@
150 - if tm.respond_to? :project 150 - if tm.respond_to? :project
151 = 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 151 = 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
152 %i.icon-remove 152 %i.icon-remove
153 -  
154 -