summaryrefslogtreecommitdiff
path: root/app/views/layouts/nav/sidebar/_profile.html.haml
blob: dda5e6b9636a99cb7e0de13c8c16dd901f3a11dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
%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') do
        .avatar-container.s40.settings-avatar
          = image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile js-sidebar-user-avatar", alt: current_user.name, data: { testid: 'sidebar-user-avatar' }
        .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')
      = 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')
      = 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'