gitlab-org--gitlab-foss/app/views/admin/users/show.html.haml

110 lines
3.3 KiB
Plaintext
Raw Normal View History

%h3.page-title
User:
= @user.name
- if @user.blocked?
%span.cred (Blocked)
- if @user.admin
%span.cred (Admin)
.pull-right
= link_to edit_admin_user_path(@user), class: "btn grouped" do
%i.icon-edit
Edit
- unless @user == current_user
- if @user.blocked?
= link_to 'Unblock', unblock_admin_user_path(@user), method: :put, class: "btn grouped success"
- else
= link_to 'Block', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn grouped btn-remove"
%hr
2013-02-13 17:14:35 +00:00
.row
.span6
.ui-box
2013-07-13 17:36:21 +00:00
.title
Account:
.pull-right
= image_tag gravatar_icon(@user.email, 32), class: "avatar s32"
%ul.well-list
%li
%span.light Name:
%strong= @user.name
%li
%span.light Username:
%strong
= @user.username
%li
%span.light Email:
%strong
= mail_to @user.email
%li
%span.light Member since:
%strong
= @user.created_at.stamp("Nov 12, 2031")
%li
%span.light Last sign-in at:
%strong
- if @user.last_sign_in_at
= @user.last_sign_in_at.stamp("Nov 12, 2031")
- else
never
- if @user.ldap_user?
%li
%span.light LDAP uid:
%strong
= @user.extern_uid
- if @user.created_by
%li
%span.light Created by:
%strong
= link_to @user.created_by.name, [:admin, @user.created_by]
.alert.alert-error
%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 User personal projects will be removed and cannot be restored
%li Owned groups will be transfered to first admin
= link_to 'Remove user', [:admin, @user], confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-remove"
.span6
- if @user.users_groups.present?
2013-02-13 17:14:35 +00:00
.ui-box
2013-07-13 17:36:21 +00:00
.title Groups:
2013-02-13 17:14:35 +00:00
%ul.well-list
- @user.users_groups.each do |user_group|
- group = user_group.group
2013-02-13 17:14:35 +00:00
%li
%strong= link_to group.name, admin_group_path(group)
.pull-right
%span.light= user_group.human_access
2013-02-13 17:14:35 +00:00
.ui-box
2013-07-13 17:36:21 +00:00
.title Projects (#{@projects.count})
2013-02-13 17:14:35 +00:00
%ul.well-list
- @projects.sort_by(&:name_with_namespace).each do |project|
- tm = project.team.find_tm(@user.id)
2013-02-13 17:14:35 +00:00
%li
= link_to admin_project_path(project), class: dom_class(project) do
- if project.namespace
= project.namespace.human_name
\/
%strong.well-title
= truncate(project.name, length: 45)
- if tm
.pull-right
- if tm.owner?
%span.light Owner
- else
%span.light= tm.human_access
= 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