2013-07-13 01:45:48 -04:00
%h3.page-title
2013-06-13 14:06:27 -04:00
User:
2013-06-26 08:57:02 -04:00
= @user.name
- if @user.blocked?
2013-06-13 14:06:27 -04:00
%span.cred (Blocked)
2013-06-26 08:57:02 -04:00
- if @user.admin
2013-06-13 14:06:27 -04:00
%span.cred (Admin)
.pull-right
2013-06-26 08:57:02 -04:00
= link_to edit_admin_user_path(@user), class: "btn grouped btn-small" do
2013-06-13 14:06:27 -04:00
%i.icon-edit
Edit
2013-06-26 08:57:02 -04:00
- unless @user == current_user
- if @user.blocked?
= link_to 'Unblock', unblock_admin_user_path(@user), method: :put, class: "btn grouped btn-small success"
2013-06-13 14:06:27 -04:00
- else
2013-06-26 08:57:02 -04:00
= 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"
2013-06-13 14:06:27 -04:00
%hr
2013-02-13 12:14:35 -05:00
.row
.span6
2013-06-13 14:06:27 -04:00
.ui-box
%h5.title
Account:
.pull-right
2013-06-26 08:57:02 -04:00
= image_tag gravatar_icon(@user.email, 32), class: "avatar s32"
2013-06-13 14:06:27 -04:00
%ul.well-list
%li
%span.light Name:
2013-06-26 08:57:02 -04:00
%strong= @user.name
2013-06-13 14:06:27 -04:00
%li
%span.light Username:
%strong
2013-06-26 08:57:02 -04:00
= @user.username
2013-06-13 14:06:27 -04:00
%li
%span.light Email:
%strong
2013-06-26 08:57:02 -04:00
= mail_to @user.email
2013-06-13 14:06:27 -04:00
%li
%span.light Member since:
%strong
2013-06-26 08:57:02 -04:00
= @user.created_at.stamp("Nov 12, 2031")
2013-06-13 14:06:27 -04:00
%li
%span.light Last sign-in at:
%strong
2013-06-26 08:57:02 -04:00
- if @user.last_sign_in_at
= @user.last_sign_in_at.stamp("Nov 12, 2031")
2013-06-14 01:37:55 -04:00
- else
never
2013-06-13 14:06:27 -04:00
2013-06-26 08:57:02 -04:00
- if @user.ldap_user?
2013-06-13 14:06:27 -04:00
%li
%span.light LDAP uid:
%strong
2013-06-26 08:57:02 -04:00
= @user.extern_uid
2013-06-13 14:06:27 -04:00
2013-06-26 08:57:02 -04:00
- if @user.created_by
2013-06-13 14:06:27 -04:00
%li
%span.light Created by:
%strong
2013-06-26 08:57:02 -04:00
= link_to @user.created_by.name, [:admin, @user.created_by]
2013-06-13 14:06:27 -04:00
2013-06-26 08:57:02 -04:00
- if @user.users_groups.present?
2013-02-13 12:14:35 -05:00
.ui-box
2013-06-22 07:11:20 -04:00
%h5.title Groups:
2013-02-13 12:14:35 -05:00
%ul.well-list
2013-06-26 08:57:02 -04:00
- @user.users_groups.each do |user_group|
2013-06-22 07:11:20 -04:00
- group = user_group.group
2013-02-13 12:14:35 -05:00
%li
%strong= link_to group.name, admin_group_path(group)
2013-06-22 07:11:20 -04:00
.pull-right
%span.light= user_group.human_access
2012-04-16 16:33:03 -04:00
2013-02-13 12:14:35 -05:00
.span6
.ui-box
%h5.title Projects (#{@projects.count})
%ul.well-list
2013-05-08 13:11:49 -04:00
- @projects.sort_by(&:name_with_namespace).each do |project|
2013-06-26 08:57:02 -04:00
- tm = project.team.find_tm(@user.id)
2013-02-13 12:14:35 -05: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)
2013-06-13 14:06:27 -04:00
- if tm
.pull-right
2013-06-22 07:11:20 -04:00
%span.light= tm.human_access
2013-06-26 08:57:02 -04:00
= 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
2013-02-13 12:14:35 -05:00
%i.icon-remove