debian-mirror-gitlab/app/views/admin/users/_head.html.haml
2021-08-04 16:29:09 +05:30

43 lines
1.6 KiB
Text

%h3.page-title
= @user.name
- if @user.blocked_pending_approval?
%span.cred
= s_('AdminUsers|(Pending approval)')
- elsif @user.banned?
%span.cred
= s_('AdminUsers|(Banned)')
- elsif @user.blocked?
%span.cred
= s_('AdminUsers|(Blocked)')
- if @user.internal?
%span.cred
= s_('AdminUsers|(Internal)')
- if @user.admin
%span.cred
= s_('AdminUsers|(Admin)')
- if @user.deactivated?
%span.cred
= s_('AdminUsers|(Deactivated)')
= render_if_exists 'admin/users/auditor_user_badge'
= render_if_exists 'admin/users/gma_user_badge'
.float-right
- if impersonation_enabled? && @user != current_user && @user.can?(:log_in)
= link_to _('Impersonate'), impersonate_admin_user_path(@user), method: :post, class: "btn btn-info gl-button btn-grouped", data: { qa_selector: 'impersonate_user_link' }
= link_to edit_admin_user_path(@user), class: "btn btn-default gl-button btn-grouped" do
= sprite_icon('pencil-square', css_class: 'gl-icon gl-button-icon')
= _('Edit')
%hr
%ul.nav-links.nav.nav-tabs
= nav_link(path: 'users#show') do
= link_to _("Account"), admin_user_path(@user)
= nav_link(path: 'users#projects') do
= link_to _("Groups and projects"), projects_admin_user_path(@user)
= nav_link(path: 'users#keys') do
= link_to _("SSH keys"), keys_admin_user_path(@user)
= nav_link(controller: :identities) do
= link_to _("Identities"), admin_user_identities_path(@user)
- if impersonation_enabled?
= nav_link(controller: :impersonation_tokens) do
= link_to _("Impersonation Tokens"), admin_user_impersonation_tokens_path(@user)
.gl-mb-3