debian-mirror-gitlab/app/views/layouts/nav/sidebar/_profile.html.haml
2023-04-23 21:23:45 +05:30

169 lines
8 KiB
Text

%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(current_user), 'aria-label': _('User settings') }
.nav-sidebar-inner-scroll
.context-header
= link_to profile_path, title: _('Profile Settings'), class: 'has-tooltip', data: { container: 'body', placement: 'right' } do
= render Pajamas::AvatarComponent.new(current_user, size: 32, alt: current_user.name, class: 'gl-mr-3 js-sidebar-user-avatar', avatar_options: { data: { testid: 'sidebar-user-avatar' } })
%span.sidebar-context-title= _('User Settings')
%ul.sidebar-top-level-items
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
= link_to profile_path do
.nav-icon-container
= sprite_icon('profile')
%span.nav-item-name
= _('Profile')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: 'profiles#show', html_options: { class: "fly-out-top-item" }) do
= link_to profile_path do
%strong.fly-out-top-item-name
= _('Profile')
= nav_link(controller: [:accounts, :two_factor_auths]) do
= link_to profile_account_path, data: { qa_selector: 'profile_account_link' } do
.nav-icon-container
= sprite_icon('account')
%span.nav-item-name
= _('Account')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: [:accounts, :two_factor_auths], html_options: { class: "fly-out-top-item" }) do
= link_to profile_account_path do
%strong.fly-out-top-item-name
= _('Account')
= render_if_exists 'layouts/nav/sidebar/profile_billing_link'
= nav_link(controller: 'oauth/applications') do
= link_to applications_profile_path do
.nav-icon-container
= sprite_icon('applications')
%span.nav-item-name
= _('Applications')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: 'oauth/applications', html_options: { class: "fly-out-top-item" }) do
= link_to applications_profile_path do
%strong.fly-out-top-item-name
= _('Applications')
= nav_link(controller: :chat_names) do
= link_to profile_chat_names_path do
.nav-icon-container
= sprite_icon('comment')
%span.nav-item-name
= _('Chat')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :chat_names, html_options: { class: "fly-out-top-item" }) do
= link_to profile_chat_names_path do
%strong.fly-out-top-item-name
= _('Chat')
- unless Gitlab::CurrentSettings.personal_access_tokens_disabled?
= nav_link(controller: :personal_access_tokens) do
= link_to profile_personal_access_tokens_path do
.nav-icon-container
= sprite_icon('token')
%span.nav-item-name
= _('Access Tokens')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :personal_access_tokens, html_options: { class: "fly-out-top-item" }) do
= link_to profile_personal_access_tokens_path do
%strong.fly-out-top-item-name
= _('Access Tokens')
= nav_link(controller: :emails) do
= link_to profile_emails_path, data: { qa_selector: 'profile_emails_link' } do
.nav-icon-container
= sprite_icon('mail')
%span.nav-item-name
= _('Emails')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :emails, html_options: { class: "fly-out-top-item" }) do
= link_to profile_emails_path do
%strong.fly-out-top-item-name
= _('Emails')
- if current_user.allow_password_authentication?
= nav_link(controller: :passwords) do
= link_to edit_profile_password_path , data: { qa_selector: 'profile_password_link' } do
.nav-icon-container
= sprite_icon('lock')
%span.nav-item-name
= _('Password')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :passwords, html_options: { class: "fly-out-top-item" }) do
= link_to edit_profile_password_path do
%strong.fly-out-top-item-name
= _('Password')
= nav_link(controller: :notifications) do
= link_to profile_notifications_path do
.nav-icon-container
= sprite_icon('notifications')
%span.nav-item-name
= _('Notifications')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :notifications, html_options: { class: "fly-out-top-item" }) do
= link_to profile_notifications_path do
%strong.fly-out-top-item-name
= _('Notifications')
= nav_link(controller: :keys) do
= link_to profile_keys_path do
.nav-icon-container
= sprite_icon('key')
%span.nav-item-name
= _('SSH Keys')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :keys, html_options: { class: "fly-out-top-item" }) do
= link_to profile_keys_path do
%strong.fly-out-top-item-name
= _('SSH Keys')
= nav_link(controller: :gpg_keys) do
= link_to profile_gpg_keys_path do
.nav-icon-container
= sprite_icon('key')
%span.nav-item-name
= _('GPG Keys')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :gpg_keys, html_options: { class: "fly-out-top-item" }) do
= link_to profile_gpg_keys_path do
%strong.fly-out-top-item-name
= _('GPG Keys')
= nav_link(controller: :preferences) do
= link_to profile_preferences_path do
.nav-icon-container
= sprite_icon('preferences')
%span.nav-item-name
= _('Preferences')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :preferences, html_options: { class: "fly-out-top-item" }) do
= link_to profile_preferences_path do
%strong.fly-out-top-item-name
= _('Preferences')
- if saved_replies_enabled?
= nav_link(controller: :saved_replies) do
= link_to profile_saved_replies_path do
.nav-icon-container
= sprite_icon('symlink')
%span.nav-item-name
= _('Saved Replies')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :saved_replies, html_options: { class: "fly-out-top-item" }) do
= link_to profile_saved_replies_path do
%strong.fly-out-top-item-name
= _('Saved Replies')
= nav_link(controller: :active_sessions) do
= link_to profile_active_sessions_path do
.nav-icon-container
= sprite_icon('monitor-lines')
%span.nav-item-name
= _('Active Sessions')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :active_sessions, html_options: { class: "fly-out-top-item" }) do
= link_to profile_active_sessions_path do
%strong.fly-out-top-item-name
= _('Active Sessions')
= nav_link(path: 'profiles#audit_log') do
= link_to audit_log_profile_path do
.nav-icon-container
= sprite_icon('log')
%span.nav-item-name
= _('Authentication log')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: 'profiles#audit_log', html_options: { class: "fly-out-top-item" }) do
= link_to audit_log_profile_path do
%strong.fly-out-top-item-name
= _('Authentication Log')
= render_if_exists 'layouts/nav/sidebar/profile_usage_quotas_link'
= render 'shared/sidebar_toggle_button'