2018-10-15 14:42:47 +05:30
|
|
|
- return unless current_user
|
|
|
|
|
|
|
|
%ul
|
|
|
|
%li.current-user
|
2021-01-29 00:20:46 +05:30
|
|
|
.user-name.gl-font-weight-bold
|
2018-10-15 14:42:47 +05:30
|
|
|
= current_user.name
|
2021-01-29 00:20:46 +05:30
|
|
|
- if current_user&.status && user_status_set_to_busy?(current_user.status)
|
|
|
|
%span.gl-font-weight-normal.gl-text-gray-500= s_("UserProfile|(Busy)")
|
2018-10-15 14:42:47 +05:30
|
|
|
= current_user.to_reference
|
2018-12-05 23:21:45 +05:30
|
|
|
- if current_user.status
|
2020-06-23 00:09:42 +05:30
|
|
|
.user-status.d-flex.align-items-center.gl-mt-2.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } }
|
2021-01-29 00:20:46 +05:30
|
|
|
- if show_status_emoji?(current_user.status)
|
|
|
|
.user-status-emoji.d-flex.align-items-center
|
|
|
|
= emoji_icon current_user.status.emoji
|
2018-12-13 13:39:08 +05:30
|
|
|
%span.user-status-message.str-truncated
|
|
|
|
= current_user.status.message_html.html_safe
|
2018-10-15 14:42:47 +05:30
|
|
|
%li.divider
|
2018-12-05 23:21:45 +05:30
|
|
|
- if can?(current_user, :update_user_status, current_user)
|
|
|
|
%li
|
2020-11-24 15:15:51 +05:30
|
|
|
%button.btn.menu-item.js-set-status-modal-trigger{ type: 'button' }
|
2021-02-22 17:27:13 +05:30
|
|
|
- if show_status_emoji?(current_user.status) || user_status_set_to_busy?(current_user.status)
|
2020-11-24 15:15:51 +05:30
|
|
|
= s_('SetStatusModal|Edit status')
|
|
|
|
- else
|
|
|
|
= s_('SetStatusModal|Set status')
|
2018-10-15 14:42:47 +05:30
|
|
|
- if current_user_menu?(:profile)
|
|
|
|
%li
|
|
|
|
= link_to s_("CurrentUser|Profile"), current_user, class: 'profile-link', data: { user: current_user.username }
|
2019-12-26 22:10:19 +05:30
|
|
|
- if current_user_menu?(:start_trial)
|
|
|
|
%li
|
2020-01-01 13:55:28 +05:30
|
|
|
%a.trial-link{ href: trials_link_url }
|
2019-12-26 22:10:19 +05:30
|
|
|
= s_("CurrentUser|Start a Gold trial")
|
|
|
|
= emoji_icon('rocket')
|
2018-10-15 14:42:47 +05:30
|
|
|
- if current_user_menu?(:settings)
|
|
|
|
%li
|
2019-10-12 21:52:04 +05:30
|
|
|
= link_to s_("CurrentUser|Settings"), profile_path, data: { qa_selector: 'settings_link' }
|
2020-06-23 00:09:42 +05:30
|
|
|
= render_if_exists 'layouts/header/buy_pipeline_minutes', project: @project, namespace: @group
|
2020-05-24 23:13:21 +05:30
|
|
|
= render_if_exists 'layouts/header/upgrade'
|
2019-12-21 20:55:43 +05:30
|
|
|
|
|
|
|
- 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
|
2020-11-24 15:15:51 +05:30
|
|
|
%li.d-md-none
|
|
|
|
= render 'shared/help_dropdown_forum_link'
|
2019-12-21 20:55:43 +05:30
|
|
|
%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)
|
|
|
|
%li.d-md-none
|
|
|
|
= render 'shared/user_dropdown_contributing_link'
|
2021-01-03 14:25:43 +05:30
|
|
|
= render 'shared/user_dropdown_instance_review'
|
2019-12-26 22:10:19 +05:30
|
|
|
- if Gitlab.com_but_not_canary?
|
|
|
|
%li.d-md-none
|
2019-12-21 20:55:43 +05:30
|
|
|
= link_to _("Switch to GitLab Next"), "https://next.gitlab.com/"
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
- if current_user_menu?(:sign_out)
|
2018-12-13 13:39:08 +05:30
|
|
|
%li.divider
|
2018-10-15 14:42:47 +05:30
|
|
|
%li
|
2020-03-13 15:44:24 +05:30
|
|
|
= link_to _("Sign out"), destroy_user_session_path, method: :post, class: "sign-out-link", data: { qa_selector: 'sign_out_link' }
|