_admin.html.haml 9.15 KB
Newer Older
1
.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) }
2
3
4
5
  .nav-sidebar-inner-scroll
    .context-header
      = link_to admin_root_path, title: 'Admin Overview' do
        .avatar-container.s40.settings-avatar
6
          = sprite_icon('admin', size: 24)
7
        .sidebar-context-title Admin Area
8
    %ul.sidebar-top-level-items
9
      = nav_link(controller: %w(dashboard admin projects users groups jobs runners gitaly_servers cohorts conversational_development_index), html_options: {class: 'home'}) do
10
        = link_to admin_root_path, class: 'shortcuts-tree' do
11
          .nav-icon-container
12
            = sprite_icon('overview')
13
14
15
          %span.nav-item-name
            Overview
        %ul.sidebar-sub-level-items
16
          = nav_link(controller: %w(dashboard admin projects users groups jobs runners gitaly_servers cohorts conversational_development_index), html_options: { class: "fly-out-top-item" } ) do
17
18
19
20
            = link_to admin_root_path do
              %strong.fly-out-top-item-name
                #{ _('Overview') }
          %li.divider.fly-out-top-item
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
          = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
            = link_to admin_root_path, title: 'Overview' do
              %span
                Dashboard
          = nav_link(controller: [:admin, :projects]) do
            = link_to admin_projects_path, title: 'Projects' do
              %span
                Projects
          = nav_link(controller: :users) do
            = link_to admin_users_path, title: 'Users' do
              %span
                Users
          = nav_link(controller: :groups) do
            = link_to admin_groups_path, title: 'Groups' do
              %span
                Groups
          = nav_link path: 'jobs#index' do
            = link_to admin_jobs_path, title: 'Jobs' do
              %span
                Jobs
          = nav_link path: ['runners#index', 'runners#show'] do
            = link_to admin_runners_path, title: 'Runners' do
              %span
                Runners
45
46
47
48
          = nav_link(controller: :gitaly_servers) do
            = link_to admin_gitaly_servers_path, title: 'Gitaly Servers' do
              %span
                Gitaly Servers
49
50
51
52
          = nav_link path: 'cohorts#index' do
            = link_to admin_cohorts_path, title: 'Cohorts' do
              %span
                Cohorts
53
54
55
56
          = nav_link(controller: :conversational_development_index) do
            = link_to admin_conversational_development_index_path, title: 'ConvDev Index' do
              %span
                ConvDev Index
57

58
      = nav_link(controller: %w(system_info background_jobs logs health_check requests_profiles)) do
59
        = link_to admin_system_info_path do
60
          .nav-icon-container
61
            = sprite_icon('monitor')
62
63
          %span.nav-item-name
            Monitoring
64

65
        %ul.sidebar-sub-level-items
66
67
          = nav_link(controller: %w(system_info background_jobs logs health_check requests_profiles), html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_system_info_path do
68
69
70
              %strong.fly-out-top-item-name
                #{ _('Monitoring') }
          %li.divider.fly-out-top-item
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
          = nav_link(controller: :system_info) do
            = link_to admin_system_info_path, title: 'System Info' do
              %span
                System Info
          = nav_link(controller: :background_jobs) do
            = link_to admin_background_jobs_path, title: 'Background Jobs' do
              %span
                Background Jobs
          = nav_link(controller: :logs) do
            = link_to admin_logs_path, title: 'Logs' do
              %span
                Logs
          = nav_link(controller: :health_check) do
            = link_to admin_health_check_path, title: 'Health Check' do
              %span
                Health Check
          = nav_link(controller: :requests_profiles) do
            = link_to admin_requests_profiles_path, title: 'Requests Profiles' do
              %span
                Requests Profiles
91

92
      = nav_link(controller: :broadcast_messages) do
93
        = link_to admin_broadcast_messages_path do
94
          .nav-icon-container
95
            = sprite_icon('messages')
96
97
          %span.nav-item-name
            Messages
98
99
100
101
102
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :broadcast_messages, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_broadcast_messages_path do
              %strong.fly-out-top-item-name
                #{ _('Messages') }
103

104
      = nav_link(controller: [:hooks, :hook_logs]) do
105
        = link_to admin_hooks_path do
106
          .nav-icon-container
107
            = sprite_icon('hook')
108
109
          %span.nav-item-name
            System Hooks
110
111
112
113
114
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: [:hooks, :hook_logs], html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_hooks_path do
              %strong.fly-out-top-item-name
                #{ _('System Hooks') }
115

116
      = nav_link(controller: :applications) do
117
        = link_to admin_applications_path do
118
          .nav-icon-container
119
            = sprite_icon('applications')
120
121
          %span.nav-item-name
            Applications
122
123
124
125
126
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :applications, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_applications_path do
              %strong.fly-out-top-item-name
                #{ _('Applications') }
127

128
      = nav_link(controller: :abuse_reports) do
129
        = link_to admin_abuse_reports_path do
130
          .nav-icon-container
131
            = sprite_icon('slight-frown')
132
          %span.nav-item-name
133
            Abuse Reports
Clement Ho's avatar
Clement Ho committed
134
          %span.badge.badge-pill.count= number_with_delimiter(AbuseReport.count(:all))
135
136
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" } ) do
megos's avatar
megos committed
137
            = link_to admin_abuse_reports_path do
138
139
              %strong.fly-out-top-item-name
                #{ _('Abuse Reports') }
Clement Ho's avatar
Clement Ho committed
140
              %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(AbuseReport.count(:all))
141

142
143
      - if akismet_enabled?
        = nav_link(controller: :spam_logs) do
144
          = link_to admin_spam_logs_path do
145
            .nav-icon-container
146
              = sprite_icon('spam')
147
148
            %span.nav-item-name
              Spam Logs
149
150
151
152
153
          %ul.sidebar-sub-level-items.is-fly-out-only
            = nav_link(controller: :spam_logs, html_options: { class: "fly-out-top-item" } ) do
              = link_to admin_spam_logs_path do
                %strong.fly-out-top-item-name
                  #{ _('Spam Logs') }
154

155
      = nav_link(controller: :deploy_keys) do
156
        = link_to admin_deploy_keys_path do
157
          .nav-icon-container
158
            = sprite_icon('key')
159
160
          %span.nav-item-name
            Deploy Keys
161
162
163
164
165
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :deploy_keys, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_deploy_keys_path do
              %strong.fly-out-top-item-name
                #{ _('Deploy Keys') }
166

167
      = nav_link(controller: :services) do
168
        = link_to admin_application_settings_services_path do
169
          .nav-icon-container
170
            = sprite_icon('template')
171
172
          %span.nav-item-name
            Service Templates
173
174
175
176
177
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :services, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_application_settings_services_path do
              %strong.fly-out-top-item-name
                #{ _('Service Templates') }
178

179
      = nav_link(controller: :labels) do
180
        = link_to admin_labels_path do
181
          .nav-icon-container
182
            = sprite_icon('labels')
183
184
          %span.nav-item-name
            Labels
185
186
187
188
189
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :labels, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_labels_path do
              %strong.fly-out-top-item-name
                #{ _('Labels') }
190

191
      = nav_link(controller: :appearances) do
192
        = link_to admin_appearances_path do
193
          .nav-icon-container
194
            = sprite_icon('appearance')
195
196
          %span.nav-item-name
            Appearance
197
198
199
200
201
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :appearances, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_appearances_path do
              %strong.fly-out-top-item-name
                #{ _('Appearance') }
202
203

      = nav_link(controller: :application_settings) do
204
        = link_to admin_application_settings_path do
205
          .nav-icon-container
206
            = sprite_icon('settings')
207
208
          %span.nav-item-name
            Settings
209
210
211
212
213
        %ul.sidebar-sub-level-items.is-fly-out-only
          = nav_link(controller: :application_settings, html_options: { class: "fly-out-top-item" } ) do
            = link_to admin_application_settings_path do
              %strong.fly-out-top-item-name
                #{ _('Settings') }
214

215
    = render 'shared/sidebar_toggle_button'