debian-mirror-gitlab/app/views/layouts/header/_current_user_dropdown.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
2.1 KiB
Text
Raw Normal View History

2018-10-15 14:42:47 +05:30
- return unless current_user
%ul
%li.current-user
2021-03-11 19:13:27 +05:30
- if current_user_menu?(:profile)
2021-06-08 01:23:25 +05:30
= link_to current_user, class: 'gl-line-height-20!', data: { user: current_user.username, testid: 'user-profile-link', qa_selector: 'user_profile_link' } do
2021-03-11 19:13:27 +05:30
= render 'layouts/header/current_user_dropdown_item'
- else
.gl-py-3.gl-px-4
= render 'layouts/header/current_user_dropdown_item'
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
2021-04-29 21:17:54 +05:30
%button.gl-button.btn.btn-link.menu-item.js-set-status-modal-trigger{ type: 'button' }
2022-08-27 11:52:29 +05:30
- if current_user.status&.busy? || current_user.status&.customized?
2020-11-24 15:15:51 +05:30
= s_('SetStatusModal|Edit status')
- else
= s_('SetStatusModal|Set status')
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 }
2021-03-11 19:13:27 +05:30
= s_("CurrentUser|Start an Ultimate trial")
2019-12-26 22:10:19 +05:30
= emoji_icon('rocket')
2018-10-15 14:42:47 +05:30
- if current_user_menu?(:settings)
%li
2021-03-11 19:13:27 +05:30
= link_to s_("CurrentUser|Edit profile"), profile_path, data: { qa_selector: 'edit_profile_link' }
%li
= link_to s_("CurrentUser|Preferences"), profile_preferences_path
2020-06-23 00:09:42 +05:30
= render_if_exists 'layouts/header/buy_pipeline_minutes', project: @project, namespace: @group
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
2022-10-11 01:57:18 +05:30
= link_to _("Submit feedback"), Gitlab::Utils.append_path(promo_url, "submit-feedback")
2019-12-21 20:55:43 +05:30
- 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
2022-01-26 12:08:38 +05:30
= link_to _("Switch to GitLab Next"), Gitlab::Saas.canary_toggle_com_url
2019-12-21 20:55:43 +05:30
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' }