2018-11-26 06:38:34 -05:00
|
|
|
-# WAIT! Before adding more items to the nav bar, please see
|
|
|
|
-# https://gitlab.com/gitlab-org/gitlab-ce/issues/49713 for more information.
|
2017-09-06 06:58:24 -04:00
|
|
|
%ul.list-unstyled.navbar-sub-nav
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:projects)
|
2018-12-21 02:56:43 -05:00
|
|
|
= nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: { id: 'nav-projects-dropdown', class: "home dropdown header-projects qa-projects-dropdown", data: { track_label: "projects_dropdown", track_event: "click_dropdown" } }) do
|
2019-03-19 20:04:21 -04:00
|
|
|
%button.btn{ type: 'button', data: { toggle: "dropdown" } }
|
2018-06-13 02:30:40 -04:00
|
|
|
= _('Projects')
|
2017-12-11 09:21:06 -05:00
|
|
|
= sprite_icon('angle-down', css_class: 'caret-down')
|
2018-07-06 09:40:11 -04:00
|
|
|
.dropdown-menu.frequent-items-dropdown-menu
|
2017-12-11 09:21:06 -05:00
|
|
|
= render "layouts/nav/projects_dropdown/show"
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:groups)
|
2019-01-16 07:09:29 -05:00
|
|
|
= nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "home dropdown header-groups qa-groups-dropdown", data: { track_label: "groups_dropdown", track_event: "click_dropdown" } }) do
|
2019-03-19 20:04:21 -04:00
|
|
|
%button.btn{ type: 'button', data: { toggle: "dropdown" } }
|
2018-06-13 02:30:40 -04:00
|
|
|
= _('Groups')
|
2018-07-06 09:40:11 -04:00
|
|
|
= sprite_icon('angle-down', css_class: 'caret-down')
|
|
|
|
.dropdown-menu.frequent-items-dropdown-menu
|
|
|
|
= render "layouts/nav/groups_dropdown/show"
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:activity)
|
2018-11-26 06:38:34 -05:00
|
|
|
= nav_link(path: 'dashboard#activity', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: _('Activity') do
|
|
|
|
= _('Activity')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:milestones)
|
2018-11-26 06:38:34 -05:00
|
|
|
= nav_link(controller: 'dashboard/milestones', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do
|
|
|
|
= _('Milestones')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:snippets)
|
2018-11-26 06:38:34 -05:00
|
|
|
= nav_link(controller: 'dashboard/snippets', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
|
2019-02-19 15:23:34 -05:00
|
|
|
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets qa-snippets-link', title: _('Snippets') do
|
2018-06-13 02:30:40 -04:00
|
|
|
= _('Snippets')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets])
|
2018-11-26 06:38:34 -05:00
|
|
|
%li.header-more.dropdown.d-xl-none{ class: ('d-lg-none' unless has_extra_nav_icons?) }
|
2017-12-11 09:21:06 -05:00
|
|
|
%a{ href: "#", data: { toggle: "dropdown" } }
|
2018-06-13 02:30:40 -04:00
|
|
|
= _('More')
|
2017-12-11 09:21:06 -05:00
|
|
|
= sprite_icon('angle-down', css_class: 'caret-down')
|
|
|
|
.dropdown-menu
|
|
|
|
%ul
|
|
|
|
- if dashboard_nav_link?(:activity)
|
|
|
|
= nav_link(path: 'dashboard#activity') do
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to activity_dashboard_path, title: _('Activity') do
|
|
|
|
= _('Activity')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:milestones)
|
|
|
|
= nav_link(controller: 'dashboard/milestones') do
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do
|
|
|
|
= _('Milestones')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:snippets)
|
|
|
|
= nav_link(controller: 'dashboard/snippets') do
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do
|
|
|
|
= _('Snippets')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2018-11-26 06:38:34 -05:00
|
|
|
= render_if_exists 'dashboard/operations/nav_link'
|
|
|
|
- if can?(current_user, :read_instance_statistics)
|
|
|
|
= nav_link(controller: [:conversational_development_index, :cohorts]) do
|
|
|
|
= link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= _('Instance Statistics')
|
|
|
|
- if current_user.admin?
|
|
|
|
= nav_link(controller: 'admin/dashboard') do
|
|
|
|
= link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin Area'), aria: { label: _('Admin Area') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= _('Admin Area')
|
|
|
|
- if Gitlab::Sherlock.enabled?
|
|
|
|
%li
|
|
|
|
= link_to sherlock_transactions_path, class: 'admin-icon', title: _('Sherlock Transactions'),
|
|
|
|
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= _('Sherlock Transactions')
|
|
|
|
|
2017-09-06 06:58:24 -04:00
|
|
|
-# Shortcut to Dashboard > Projects
|
2017-12-11 09:21:06 -05:00
|
|
|
- if dashboard_nav_link?(:projects)
|
|
|
|
%li.hidden
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to dashboard_projects_path, title: _('Projects'), class: 'dashboard-shortcuts-projects' do
|
|
|
|
= _('Projects')
|
2017-09-06 06:58:24 -04:00
|
|
|
|
2018-01-05 12:35:34 -05:00
|
|
|
- if current_controller?('ide')
|
2018-04-09 17:50:40 -04:00
|
|
|
%li.line-separator.d-none.d-sm-block
|
2018-01-05 12:35:34 -05:00
|
|
|
= nav_link(controller: 'ide') do
|
2018-06-13 02:30:40 -04:00
|
|
|
= link_to '#', class: 'dashboard-shortcuts-web-ide', title: _('Web IDE') do
|
|
|
|
= _('Web IDE')
|
2018-01-05 12:35:34 -05:00
|
|
|
|
2018-10-12 10:10:34 -04:00
|
|
|
= render_if_exists 'dashboard/operations/nav_link'
|
2018-07-23 09:30:11 -04:00
|
|
|
- if can?(current_user, :read_instance_statistics)
|
2018-11-26 06:38:34 -05:00
|
|
|
= nav_link(controller: [:conversational_development_index, :cohorts], html_options: { class: "d-none d-lg-block d-xl-block"}) do
|
2018-07-30 07:23:18 -04:00
|
|
|
= link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2018-07-17 21:41:40 -04:00
|
|
|
= sprite_icon('chart', size: 18)
|
2018-07-23 09:36:30 -04:00
|
|
|
- if current_user.admin?
|
2018-11-26 06:38:34 -05:00
|
|
|
= nav_link(controller: 'admin/dashboard', html_options: { class: "d-none d-lg-block d-xl-block"}) do
|
|
|
|
= link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin Area'), aria: { label: _('Admin Area') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2018-07-23 09:36:30 -04:00
|
|
|
= sprite_icon('admin', size: 18)
|
2017-09-06 06:58:24 -04:00
|
|
|
- if Gitlab::Sherlock.enabled?
|
|
|
|
%li
|
2018-11-26 06:38:34 -05:00
|
|
|
= link_to sherlock_transactions_path, class: 'admin-icon d-none d-lg-block d-xl-block', title: _('Sherlock Transactions'),
|
2017-09-06 06:58:24 -04:00
|
|
|
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2018-07-23 09:36:30 -04:00
|
|
|
= icon('tachometer fw')
|