diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-26 15:57:02 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-26 15:57:02 +0300 |
commit | 1dd80d22a58d6407951e89eedcdbf21d340f9261 (patch) | |
tree | 65a987900b5d592f11adebcf4be1ce3d7af96791 /app/views/admin/users/show.html.haml | |
parent | 21f7c99c25615961f6eed870b38ba8fba558b879 (diff) | |
download | gitlab-ce-1dd80d22a58d6407951e89eedcdbf21d340f9261.tar.gz |
Prevent confusion in naming user variable at admin area
Diffstat (limited to 'app/views/admin/users/show.html.haml')
-rw-r--r-- | app/views/admin/users/show.html.haml | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index d0d2cc7ff4d..eaa7ebc3f49 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -1,21 +1,21 @@ %h3.page_title User: - = @admin_user.name - - if @admin_user.blocked? + = @user.name + - if @user.blocked? %span.cred (Blocked) - - if @admin_user.admin + - if @user.admin %span.cred (Admin) .pull-right - = link_to edit_admin_user_path(@admin_user), class: "btn grouped btn-small" do + = link_to edit_admin_user_path(@user), class: "btn grouped btn-small" do %i.icon-edit Edit - - unless @admin_user == current_user - - if @admin_user.blocked? - = link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn grouped btn-small success" + - unless @user == current_user + - if @user.blocked? + = link_to 'Unblock', unblock_admin_user_path(@user), method: :put, class: "btn grouped btn-small success" - else - = link_to 'Block', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn grouped btn-small btn-remove" - = link_to 'Destroy', [:admin, @admin_user], confirm: "USER #{@admin_user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn grouped btn-small btn-remove" + = link_to 'Block', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn grouped btn-small btn-remove" + = link_to 'Destroy', [:admin, @user], confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn grouped btn-small btn-remove" %hr .row @@ -24,50 +24,50 @@ %h5.title Account: .pull-right - = image_tag gravatar_icon(@admin_user.email, 32), class: "avatar s32" + = image_tag gravatar_icon(@user.email, 32), class: "avatar s32" %ul.well-list %li %span.light Name: - %strong= @admin_user.name + %strong= @user.name %li %span.light Username: %strong - = @admin_user.username + = @user.username %li %span.light Email: %strong - = mail_to @admin_user.email + = mail_to @user.email %li %span.light Member since: %strong - = @admin_user.created_at.stamp("Nov 12, 2031") + = @user.created_at.stamp("Nov 12, 2031") %li %span.light Last sign-in at: %strong - - if @admin_user.last_sign_in_at - = @admin_user.last_sign_in_at.stamp("Nov 12, 2031") + - if @user.last_sign_in_at + = @user.last_sign_in_at.stamp("Nov 12, 2031") - else never - - if @admin_user.ldap_user? + - if @user.ldap_user? %li %span.light LDAP uid: %strong - = @admin_user.extern_uid + = @user.extern_uid - - if @admin_user.created_by + - if @user.created_by %li %span.light Created by: %strong - = link_to @admin_user.created_by.name, [:admin, @admin_user.created_by] + = link_to @user.created_by.name, [:admin, @user.created_by] - - if @admin_user.users_groups.present? + - if @user.users_groups.present? .ui-box %h5.title Groups: %ul.well-list - - @admin_user.users_groups.each do |user_group| + - @user.users_groups.each do |user_group| - group = user_group.group %li %strong= link_to group.name, admin_group_path(group) @@ -79,7 +79,7 @@ %h5.title Projects (#{@projects.count}) %ul.well-list - @projects.sort_by(&:name_with_namespace).each do |project| - - tm = project.team.get_tm(@admin_user.id) + - tm = project.team.find_tm(@user.id) %li = link_to admin_project_path(project), class: dom_class(project) do - if project.namespace @@ -91,5 +91,5 @@ - if tm .pull-right %span.light= tm.human_access - = link_to admin_project_member_path(project, tm.user), confirm: remove_from_project_team_message(project, @admin_user), method: :delete, class: "btn btn-small btn-remove" do + = link_to admin_project_member_path(project, tm.user), confirm: remove_from_project_team_message(project, @user), method: :delete, class: "btn btn-small btn-remove" do %i.icon-remove |