diff options
Diffstat (limited to 'app/views/admin/users/show.html.haml')
-rw-r--r-- | app/views/admin/users/show.html.haml | 220 |
1 files changed, 111 insertions, 109 deletions
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 9197d6684e0..7edea81a123 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -5,138 +5,140 @@ .row .col-md-6 - .card - .card-header + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-py-2'}) do |c| + - c.header do = @user.name - %ul.content-list - %li - = image_tag avatar_icon_for_user(@user, 60, current_user: current_user), class: "avatar s60" - %li - %span.light= _('Profile page:') - %strong - = link_to user_path(@user) do - = @user.username + - 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 -# 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' - .card - .card-header + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-py-2'}) do |c| + - c.header do = _('Account:') - %ul.content-list - %li - %span.light= _('Name:') - %strong= @user.name - %li - %span.light= _('Username:') - %strong - = @user.username - %li - %span.light= _('Email:') - %strong - = 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:') + - c.body do + %ul.content-list + %li + %span.light= _('Name:') + %strong= @user.name + %li + %span.light= _('Username:') %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') - %li - %span.light ID: - %strong{ data: { qa_selector: 'user_id_content' } } - = @user.id - %li - %span.light= _('Namespace ID:') - %strong - = @user.namespace_id - - %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') - - = render_if_exists 'admin/namespace_plan_info', namespace: @user.namespace - - %li - %span.light= _('External User:') - %strong - = @user.external? ? _('Yes') : _('No') - - = render_if_exists 'admin/users/provisioned_by', user: @user - - %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:') + = @user.username + %li + %span.light= _('Email:') %strong - = @user.confirmed_at.to_s(:medium) - - else + = 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') %li - %span.ligh= _('Confirmed:') - %strong.cred - = _('No') + %span.light ID: + %strong{ data: { qa_selector: 'user_id_content' } } + = @user.id + %li + %span.light= _('Namespace ID:') + %strong + = @user.namespace_id - %li - %span.light= _('Current sign-in IP:') - %strong - = @user.current_sign_in_ip || _('never') + %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') - %li - %span.light= _('Current sign-in at:') - %strong - = @user.current_sign_in_at&.to_s(:medium) || _('never') + = render_if_exists 'admin/namespace_plan_info', namespace: @user.namespace - %li - %span.light= _('Last sign-in IP:') - %strong - = @user.last_sign_in_ip || _('never') + %li + %span.light= _('External User:') + %strong + = @user.external? ? _('Yes') : _('No') - %li - %span.light= _('Last sign-in at:') - %strong - = @user.last_sign_in_at&.to_s(:medium) || _('never') + = render_if_exists 'admin/users/provisioned_by', user: @user - %li - %span.light= _('Sign-in count:') - %strong - = @user.sign_in_count + %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') - %li - %span.light= _("Highest role:") - %strong - = Gitlab::Access.human_access_with_none(@user.highest_role) + %li + %span.light= _('Current sign-in IP:') + %strong + = @user.current_sign_in_ip || _('never') - = render_if_exists 'admin/users/using_license_seat', user: @user + %li + %span.light= _('Current sign-in at:') + %strong + = @user.current_sign_in_at&.to_s(:medium) || _('never') - - if @user.ldap_user? %li - %span.light= _('LDAP uid:') + %span.light= _('Last sign-in IP:') %strong - = @user.ldap_identity.extern_uid + = @user.last_sign_in_ip || _('never') - - if @user.created_by %li - %span.light= _('Created by:') + %span.light= _('Last sign-in at:') %strong - = link_to @user.created_by.name, [:admin, @user.created_by] + = @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] - = render_if_exists 'namespaces/shared_runner_status', namespace: @user.namespace + = render_if_exists 'namespaces/shared_runner_status', namespace: @user.namespace = render_if_exists 'admin/users/credit_card_info', user: @user, link_to_match_page: true |