debian-mirror-gitlab/app/views/admin/users/show.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

151 lines
5.6 KiB
Text
Raw Normal View History

2020-07-28 23:09:34 +05:30
- add_to_breadcrumbs _("Users"), admin_users_path
2018-03-17 18:26:18 +05:30
- breadcrumb_title @user.name
2020-07-28 23:09:34 +05:30
- page_title @user.name, _("Users")
2015-09-11 14:41:01 +05:30
= render 'admin/users/head'
.row
.col-md-6
2022-11-25 23:54:43 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-py-2'}) do |c|
- c.header do
2015-09-11 14:41:01 +05:30
= @user.name
2022-11-25 23:54:43 +05:30
- c.body do
%ul.content-list
%li
= render Pajamas::AvatarComponent.new(@user, size: 64, class: 'gl-mr-3')
%li
%span.light= _('Profile page:')
%strong
= link_to user_path(@user) do
= @user.username
2021-09-30 23:02:18 +05:30
-# Rendered on mobile only so order of cards can be different on desktop vs mobile
.gl-md-display-none
= render 'admin/users/profile', user: @user
= render 'admin/users/user_detail_note'
2022-11-25 23:54:43 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-py-2'}) do |c|
- c.header do
2021-06-08 01:23:25 +05:30
= _('Account:')
2022-11-25 23:54:43 +05:30
- c.body do
%ul.content-list
%li
%span.light= _('Name:')
%strong= @user.name
%li
%span.light= _('Username:')
2019-09-30 21:07:59 +05:30
%strong
2022-11-25 23:54:43 +05:30
= @user.username
%li
%span.light= _('Email:')
2015-09-11 14:41:01 +05:30
%strong
2022-11-25 23:54:43 +05:30
= render partial: 'shared/email_with_badge', locals: { email: mail_to(@user.email), verified: @user.confirmed? }
- @user.emails.reject(&:user_primary_email?).each do |email|
%li
%span.light= _('Secondary email:')
%strong
= render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? }
= link_to remove_email_admin_user_path(@user, email), data: { confirm: _("Are you sure you want to remove %{email}?") % { email: email.email }, 'confirm-btn-variant': 'danger' }, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon float-right", title: _('Remove secondary email'), id: "remove_email_#{email.id}" do
= sprite_icon('close', size: 16, css_class: 'gl-icon')
2015-09-11 14:41:01 +05:30
%li
2022-11-25 23:54:43 +05:30
%span.light ID:
%strong{ data: { qa_selector: 'user_id_content' } }
= @user.id
%li
%span.light= _('Namespace ID:')
%strong
= @user.namespace_id
2015-09-11 14:41:01 +05:30
2022-11-25 23:54:43 +05:30
%li.two-factor-status
%span.light= _('Two-factor Authentication:')
%strong{ class: @user.two_factor_enabled? ? 'cgreen' : 'cred' }
- if @user.two_factor_enabled?
= _('Enabled')
= link_to _('Disable'), disable_two_factor_admin_user_path(@user), aria: { label: _('Disable') }, data: { confirm: _('Are you sure?'), 'confirm-btn-variant': 'danger' }, method: :patch, class: 'btn gl-button btn-sm btn-danger float-right', title: _('Disable Two-factor Authentication')
- else
= _('Disabled')
2022-11-25 23:54:43 +05:30
= render_if_exists 'admin/namespace_plan_info', namespace: @user.namespace
2022-11-25 23:54:43 +05:30
%li
%span.light= _('External User:')
%strong
= @user.external? ? _('Yes') : _('No')
2014-09-02 18:07:02 +05:30
2022-11-25 23:54:43 +05:30
= render_if_exists 'admin/users/provisioned_by', user: @user
2015-09-11 14:41:01 +05:30
2022-11-25 23:54:43 +05:30
%li
%span.light= _('Can create groups:')
%strong
= @user.can_create_group ? _('Yes') : _('No')
%li
%span.light= _('Personal projects limit:')
%strong
= @user.projects_limit
%li
%span.light= _('Member since:')
%strong
= @user.created_at.to_s(:medium)
- if @user.confirmed_at
%li
%span.light= _('Confirmed at:')
%strong
= @user.confirmed_at.to_s(:medium)
- else
%li
%span.ligh= _('Confirmed:')
%strong.cred
= _('No')
2015-09-11 14:41:01 +05:30
2022-11-25 23:54:43 +05:30
%li
%span.light= _('Current sign-in IP:')
%strong
= @user.current_sign_in_ip || _('never')
2019-07-07 11:18:12 +05:30
2022-11-25 23:54:43 +05:30
%li
%span.light= _('Current sign-in at:')
%strong
= @user.current_sign_in_at&.to_s(:medium) || _('never')
2019-09-04 21:01:54 +05:30
2015-09-11 14:41:01 +05:30
%li
2022-11-25 23:54:43 +05:30
%span.light= _('Last sign-in IP:')
2015-09-11 14:41:01 +05:30
%strong
2022-11-25 23:54:43 +05:30
= @user.last_sign_in_ip || _('never')
2015-09-11 14:41:01 +05:30
%li
2022-11-25 23:54:43 +05:30
%span.light= _('Last sign-in at:')
2015-09-11 14:41:01 +05:30
%strong
2022-11-25 23:54:43 +05:30
= @user.last_sign_in_at&.to_s(:medium) || _('never')
%li
%span.light= _('Sign-in count:')
%strong
= @user.sign_in_count
%li
%span.light= _("Highest role:")
%strong
= Gitlab::Access.human_access_with_none(@user.highest_role)
= render_if_exists 'admin/users/using_license_seat', user: @user
- if @user.ldap_user?
%li
%span.light= _('LDAP uid:')
%strong
= @user.ldap_identity.extern_uid
- if @user.created_by
%li
%span.light= _('Created by:')
%strong
= link_to @user.created_by.name, [:admin, @user.created_by]
2015-09-11 14:41:01 +05:30
2022-11-25 23:54:43 +05:30
= render_if_exists 'namespaces/shared_runner_status', namespace: @user.namespace
2019-07-31 22:56:46 +05:30
2021-11-18 22:05:49 +05:30
= render_if_exists 'admin/users/credit_card_info', user: @user, link_to_match_page: true
2020-06-23 00:09:42 +05:30
= render 'shared/custom_attributes', custom_attributes: @user.custom_attributes
2021-09-30 23:02:18 +05:30
-# Rendered on desktop only so order of cards can be different on desktop vs mobile
.col-md-6.gl-display-none.gl-md-display-block
= render 'admin/users/profile', user: @user
= render 'admin/users/user_detail_note'