summaryrefslogtreecommitdiff
path: root/app/views/admin/users/_head.html.haml
blob: a218885a00e50ed0eff997e6b8bca04ac235ea7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
%h3.page-title
  = @user.name
  - if @user.blocked?
    %span.cred (Blocked)
  - if @user.internal?
    %span.cred (Internal)
  - if @user.admin
    %span.cred (Admin)
  - if @user.deactivated?
    %span.cred (Deactivated)
  = render_if_exists 'admin/users/audtior_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-nr btn-grouped btn-info", data: { qa_selector: 'impersonate_user_link' }
    = link_to edit_admin_user_path(@user), class: "btn btn-nr btn-grouped" do
      %i.fa.fa-pencil-square-o
      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)
  = nav_link(controller: :impersonation_tokens) do
    = link_to "Impersonation Tokens", admin_user_impersonation_tokens_path(@user)
.append-bottom-default