2018-04-25 10:54:26 -04:00
|
|
|
- return unless current_user
|
|
|
|
|
|
|
|
%ul
|
|
|
|
%li.current-user
|
|
|
|
.user-name.bold
|
|
|
|
= current_user.name
|
|
|
|
= current_user.to_reference
|
2018-10-04 04:19:51 -04:00
|
|
|
- if current_user.status
|
2018-10-19 08:28:52 -04:00
|
|
|
.user-status.d-flex.align-items-center.prepend-top-2.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } }
|
|
|
|
%span.user-status-emoji.d-flex.align-items-center
|
|
|
|
= emoji_icon current_user.status.emoji
|
|
|
|
%span.user-status-message.str-truncated
|
|
|
|
= current_user.status.message_html.html_safe
|
2018-04-25 10:54:26 -04:00
|
|
|
%li.divider
|
2018-10-04 04:19:51 -04:00
|
|
|
- if can?(current_user, :update_user_status, current_user)
|
|
|
|
%li
|
|
|
|
.js-set-status-modal-trigger{ data: { has_status: current_user.status.present? ? 'true' : 'false' } }
|
2018-04-25 10:54:26 -04:00
|
|
|
- if current_user_menu?(:profile)
|
|
|
|
%li
|
|
|
|
= link_to s_("CurrentUser|Profile"), current_user, class: 'profile-link', data: { user: current_user.username }
|
2019-11-08 07:06:32 -05:00
|
|
|
- if current_user_menu?(:start_trial)
|
|
|
|
%li
|
2019-11-22 16:06:19 -05:00
|
|
|
%a.trial-link{ href: trials_link_url }
|
2019-11-14 07:06:30 -05:00
|
|
|
= s_("CurrentUser|Start a Gold trial")
|
2019-11-08 07:06:32 -05:00
|
|
|
= emoji_icon('rocket')
|
2018-04-25 10:54:26 -04:00
|
|
|
- if current_user_menu?(:settings)
|
|
|
|
%li
|
2019-07-18 07:57:26 -04:00
|
|
|
= link_to s_("CurrentUser|Settings"), profile_path, data: { qa_selector: 'settings_link' }
|
2019-09-26 11:06:18 -04:00
|
|
|
|
|
|
|
- if current_user_menu?(:help)
|
|
|
|
%li.divider.d-md-none
|
|
|
|
%li.d-md-none
|
|
|
|
= link_to _("Help"), help_path
|
|
|
|
%li.d-md-none
|
|
|
|
= link_to _("Support"), support_url
|
|
|
|
= render_if_exists "shared/learn_gitlab_menu_item"
|
|
|
|
%li.d-md-none
|
|
|
|
= link_to _("Submit feedback"), "https://about.gitlab.com/submit-feedback"
|
|
|
|
- if current_user_menu?(:help) || current_user_menu?(:settings) || current_user_menu?(:profile)
|
2019-10-07 20:06:10 -04:00
|
|
|
%li.d-md-none
|
|
|
|
= render 'shared/user_dropdown_contributing_link'
|
2019-09-26 11:06:18 -04:00
|
|
|
= render_if_exists 'shared/user_dropdown_instance_review'
|
2019-11-07 07:06:21 -05:00
|
|
|
- if Gitlab.com_but_not_canary?
|
|
|
|
%li.d-md-none
|
2019-09-26 11:06:18 -04:00
|
|
|
= link_to _("Switch to GitLab Next"), "https://next.gitlab.com/"
|
|
|
|
|
2018-04-25 10:54:26 -04:00
|
|
|
- if current_user_menu?(:sign_out)
|
2018-10-18 09:27:04 -04:00
|
|
|
%li.divider
|
2018-04-25 10:54:26 -04:00
|
|
|
%li
|
2019-07-18 07:57:26 -04:00
|
|
|
= link_to _("Sign out"), destroy_user_session_path, class: "sign-out-link", data: { qa_selector: 'sign_out_link' }
|