summaryrefslogtreecommitdiff
path: root/app/views/layouts/header/_current_user_dropdown.html.haml
blob: a74ea246eaffa537bec97816ef032fc6a4e698fd (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
- return unless current_user

%ul
  %li.current-user
    .user-name.bold
      = current_user.name
    = current_user.to_reference
  %li.divider
  - if current_user_menu?(:profile)
    %li
      = link_to s_("CurrentUser|Profile"), current_user, class: 'profile-link', data: { user: current_user.username }
  - if current_user_menu?(:settings)
    %li
      = link_to s_("CurrentUser|Settings"), profile_path
  - if current_user_menu?(:help)
    %li
      = link_to _("Help"), help_path
  - if current_user_menu?(:help) || current_user_menu?(:settings) || current_user_menu?(:profile)
    %li.divider
  %li
    = link_to "https://about.gitlab.com/contributing", target: '_blank', class: 'text-nowrap' do
      = _("Contribute to GitLab")
      = sprite_icon('external-link', size: 16)
  %li.divider
  - if current_user_menu?(:sign_out)
    %li
      = link_to _("Sign out"), destroy_user_session_path, class: "sign-out-link"