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 78 - if @user.blocked?
79 79 .alert.alert-info
80 80 %h4 This user is blocked
81   - %br
82 81 %p Blocking user has the following effects:
83 82 %ul
84 83 %li User will not be able to login
... ... @@ -86,11 +85,11 @@
86 85 %li User will be removed from joined projects and groups
87 86 %li Personal projects will be left
88 87 %li Owned groups will be left
  88 + %br
89 89 = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' }
90 90 - else
91   - .alert
  91 + .alert.alert-warning
92 92 %h4 Block this user
93   - %br
94 93 %p Blocking user has the following effects:
95 94 %ul
96 95 %li User will not be able to login
... ... @@ -98,12 +97,12 @@
98 97 %li User will be removed from joined projects and groups
99 98 %li Personal projects will be left
100 99 %li Owned groups will be left
  100 + %br
101 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 103 .alert.alert-danger
104 104 %h4
105 105 Remove user
106   - %br
107 106 %p Deleting a user has the following effects:
108 107 %ul
109 108 %li All user content like authored issues, snippets, comments will be removed
... ... @@ -114,6 +113,7 @@
114 113 %li
115 114 Next groups with all content will be removed:
116 115 %strong #{@user.solo_owned_groups.map(&:name).join(', ')}
  116 + %br
117 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 119 .col-md-6
... ... @@ -150,5 +150,3 @@
150 150 - if tm.respond_to? :project
151 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 152 %i.icon-remove
153   -
154   -
... ...