From d47fb275ce85ce1a4b134cf7fe6d8e578d740518 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 31 Jan 2014 13:04:14 +0200 Subject: [PATCH] Fix block/remove UI for admin::users#show page --- app/views/admin/users/show.html.haml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index bd276f2..e888358 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -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 @@ -86,11 +85,11 @@ %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 @@ -98,12 +97,12 @@ %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 @@ -114,6 +113,7 @@ %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 @@ -150,5 +150,3 @@ - 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 - - -- libgit2 0.21.2