OSDN Git Service

Fix block/remove UI for admin::users#show page
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 31 Jan 2014 11:04:14 +0000 (13:04 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 31 Jan 2014 11:04:14 +0000 (13:04 +0200)
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/views/admin/users/show.html.haml

index bd276f2..e888358 100644 (file)
@@ -78,7 +78,6 @@
       - if @user.blocked?
         .alert.alert-info
           %h4 This user is blocked
-          %br
           %p Blocking user has the following effects:
           %ul
             %li User will not be able to login
             %li User will be removed from joined projects and groups
             %li Personal projects 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?' }
       - else
-        .alert
+        .alert.alert-warning
           %h4 Block this user
-          %br
           %p Blocking user has the following effects:
           %ul
             %li User will not be able to login
             %li User will be removed from joined projects and groups
             %li Personal projects 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"
 
       .alert.alert-danger
         %h4
           Remove user
-        %br
         %p Deleting a user has the following effects:
         %ul
           %li All user content like authored issues, snippets, comments will be removed
             %li
               Next groups with all content will be removed:
               %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"
 
   .col-md-6
                   - 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
                       %i.icon-remove
-
-