debian-mirror-gitlab/app/views/layouts/header/_current_user_dropdown.html.haml
2022-06-21 17:19:12 +05:30

52 lines
2.1 KiB
Text

- return unless current_user
%ul
%li.current-user
- if current_user_menu?(:profile)
= link_to current_user, class: 'gl-line-height-20!', data: { user: current_user.username, testid: 'user-profile-link', qa_selector: 'user_profile_link' } do
= render 'layouts/header/current_user_dropdown_item'
- else
.gl-py-3.gl-px-4
= render 'layouts/header/current_user_dropdown_item'
%li.divider
- if can?(current_user, :update_user_status, current_user)
%li
%button.gl-button.btn.btn-link.menu-item.js-set-status-modal-trigger{ type: 'button' }
- if show_status_emoji?(current_user.status) || user_status_set_to_busy?(current_user.status)
= s_('SetStatusModal|Edit status')
- else
= s_('SetStatusModal|Set status')
- if current_user_menu?(:start_trial)
%li
%a.trial-link{ href: trials_link_url }
= s_("CurrentUser|Start an Ultimate trial")
= emoji_icon('rocket')
- if current_user_menu?(:settings)
%li
= link_to s_("CurrentUser|Edit profile"), profile_path, data: { qa_selector: 'edit_profile_link' }
%li
= link_to s_("CurrentUser|Preferences"), profile_preferences_path
= render_if_exists 'layouts/header/buy_pipeline_minutes', project: @project, namespace: @group
- 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
%li.d-md-none
= render 'shared/help_dropdown_forum_link'
%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'
= render 'shared/user_dropdown_instance_review'
- if Gitlab.com_but_not_canary?
%li.d-md-none
= link_to _("Switch to GitLab Next"), Gitlab::Saas.canary_toggle_com_url
- if current_user_menu?(:sign_out)
%li.divider
%li
= link_to _("Sign out"), destroy_user_session_path, method: :post, class: "sign-out-link", data: { qa_selector: 'sign_out_link' }