debian-mirror-gitlab/app/views/layouts/nav/_dashboard.html.haml

104 lines
5.6 KiB
Text
Raw Normal View History

2019-02-15 15:39:39 +05:30
-# WAIT! Before adding more items to the nav bar, please see
-# https://gitlab.com/gitlab-org/gitlab-ce/issues/49713 for more information.
2018-03-17 18:26:18 +05:30
%ul.list-unstyled.navbar-sub-nav
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:projects)
2019-09-30 21:07:59 +05:30
= 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", track_value: "" } }) do
2019-07-07 11:18:12 +05:30
%button.btn{ type: 'button', data: { toggle: "dropdown" } }
2018-11-18 11:00:15 +05:30
= _('Projects')
2018-03-27 19:54:05 +05:30
= sprite_icon('angle-down', css_class: 'caret-down')
2018-11-08 19:23:39 +05:30
.dropdown-menu.frequent-items-dropdown-menu
2018-03-27 19:54:05 +05:30
= render "layouts/nav/projects_dropdown/show"
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:groups)
2019-09-30 21:07:59 +05:30
= 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", track_value: "" } }) do
2019-07-07 11:18:12 +05:30
%button.btn{ type: 'button', data: { toggle: "dropdown" } }
2018-11-18 11:00:15 +05:30
= _('Groups')
2018-11-08 19:23:39 +05:30
= sprite_icon('angle-down', css_class: 'caret-down')
.dropdown-menu.frequent-items-dropdown-menu
= render "layouts/nav/groups_dropdown/show"
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:activity)
2019-02-15 15:39:39 +05:30
= nav_link(path: 'dashboard#activity', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
2019-09-04 21:01:54 +05:30
= link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity' do
2018-11-18 11:00:15 +05:30
= _('Activity')
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:milestones)
2019-02-15 15:39:39 +05:30
= nav_link(controller: 'dashboard/milestones', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
2019-09-04 21:01:54 +05:30
= link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones' do
2018-11-18 11:00:15 +05:30
= _('Milestones')
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:snippets)
2019-02-15 15:39:39 +05:30
= nav_link(controller: 'dashboard/snippets', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
2019-09-04 21:01:54 +05:30
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets qa-snippets-link' do
2018-11-18 11:00:15 +05:30
= _('Snippets')
2018-03-17 18:26:18 +05:30
2019-10-12 21:52:04 +05:30
= render_if_exists 'layouts/nav/sidebar/analytics_link'
2018-03-27 19:54:05 +05:30
- if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets])
2019-02-15 15:39:39 +05:30
%li.header-more.dropdown.d-xl-none{ class: ('d-lg-none' unless has_extra_nav_icons?) }
2018-03-27 19:54:05 +05:30
%a{ href: "#", data: { toggle: "dropdown" } }
2018-11-18 11:00:15 +05:30
= _('More')
2018-03-27 19:54:05 +05:30
= sprite_icon('angle-down', css_class: 'caret-down')
.dropdown-menu
%ul
- if dashboard_nav_link?(:activity)
= nav_link(path: 'dashboard#activity') do
2019-09-04 21:01:54 +05:30
= link_to activity_dashboard_path do
2018-11-18 11:00:15 +05:30
= _('Activity')
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:milestones)
= nav_link(controller: 'dashboard/milestones') do
2019-09-04 21:01:54 +05:30
= link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones' do
2018-11-18 11:00:15 +05:30
= _('Milestones')
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:snippets)
= nav_link(controller: 'dashboard/snippets') do
2019-09-04 21:01:54 +05:30
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets' do
2018-11-18 11:00:15 +05:30
= _('Snippets')
2019-10-12 21:52:04 +05:30
= render_if_exists 'layouts/nav/sidebar/analytics_more_link'
2019-09-04 21:01:54 +05:30
%li.dropdown.d-lg-none
= render_if_exists 'dashboard/operations/nav_link_list'
2019-02-15 15:39:39 +05:30
- if can?(current_user, :read_instance_statistics)
2019-09-04 21:01:54 +05:30
= nav_link(controller: [:conversational_development_index, :cohorts], html_options: { class: 'd-lg-none' }) do
= link_to instance_statistics_root_path do
2019-02-15 15:39:39 +05:30
= _('Instance Statistics')
- if current_user.admin?
= nav_link(controller: 'admin/dashboard') do
2019-09-04 21:01:54 +05:30
= link_to admin_root_path, class: 'd-lg-none admin-icon qa-admin-area-link' do
2019-02-15 15:39:39 +05:30
= _('Admin Area')
- if Gitlab::Sherlock.enabled?
%li
2019-09-04 21:01:54 +05:30
= link_to sherlock_transactions_path, class: 'd-lg-none admin-icon' do
2019-02-15 15:39:39 +05:30
= _('Sherlock Transactions')
2018-03-17 18:26:18 +05:30
-# Shortcut to Dashboard > Projects
2018-03-27 19:54:05 +05:30
- if dashboard_nav_link?(:projects)
%li.hidden
2019-09-04 21:01:54 +05:30
= link_to dashboard_projects_path, class: 'dashboard-shortcuts-projects' do
2018-11-18 11:00:15 +05:30
= _('Projects')
2018-03-17 18:26:18 +05:30
- if current_controller?('ide')
2018-11-08 19:23:39 +05:30
%li.line-separator.d-none.d-sm-block
2018-03-17 18:26:18 +05:30
= nav_link(controller: 'ide') do
2019-09-04 21:01:54 +05:30
= link_to '#', class: 'dashboard-shortcuts-web-ide' do
2018-11-18 11:00:15 +05:30
= _('Web IDE')
2018-03-17 18:26:18 +05:30
2019-09-04 21:01:54 +05:30
%li.dropdown{ class: 'd-none d-lg-block' }
= render_if_exists 'dashboard/operations/nav_link'
2018-11-18 11:00:15 +05:30
- if can?(current_user, :read_instance_statistics)
2019-02-15 15:39:39 +05:30
= nav_link(controller: [:conversational_development_index, :cohorts], html_options: { class: "d-none d-lg-block d-xl-block"}) do
2018-11-18 11:00:15 +05:30
= link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= sprite_icon('chart', size: 18)
2018-03-17 18:26:18 +05:30
- if current_user.admin?
2019-02-15 15:39:39 +05:30
= 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-03-17 18:26:18 +05:30
= sprite_icon('admin', size: 18)
- if Gitlab::Sherlock.enabled?
%li
2019-02-15 15:39:39 +05:30
= link_to sherlock_transactions_path, class: 'admin-icon d-none d-lg-block d-xl-block', title: _('Sherlock Transactions'),
2018-03-17 18:26:18 +05:30
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('tachometer fw')
2019-09-04 21:01:54 +05:30
= render_if_exists 'layouts/nav/geo_primary_node_url'