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

23 lines
1 KiB
Text
Raw Normal View History

2020-03-13 15:44:24 +05:30
- navbar_links = links.sort_by(&:title)
- all_paths = navbar_links.map(&:path)
2020-04-22 19:07:51 +05:30
- analytics_link = navbar_links.find { |link| link.title == _('Value Stream') } || navbar_links.first
2020-03-13 15:44:24 +05:30
- if navbar_links.any?
= nav_link(path: all_paths) do
2021-09-04 01:27:46 +05:30
= link_to analytics_link.link, {class: 'shortcuts-analytics has-sub-items', data: { qa_selector: 'analytics_anchor' } } do
2020-03-13 15:44:24 +05:30
.nav-icon-container
= sprite_icon('chart')
%span.nav-item-name{ data: { qa_selector: 'analytics_link' } }
= _('Analytics')
%ul.sidebar-sub-level-items{ data: { qa_selector: 'analytics_sidebar_submenu' } }
2020-04-22 19:07:51 +05:30
= nav_link(path: analytics_link.path, html_options: { class: "fly-out-top-item" } ) do
= link_to analytics_link.link do
2020-04-08 14:13:33 +05:30
%strong.fly-out-top-item-name
= _('Analytics')
%li.divider.fly-out-top-item
2020-03-13 15:44:24 +05:30
- navbar_links.each do |menu_item|
= nav_link(path: menu_item.path) do
= link_to(menu_item.link, menu_item.link_to_options) do
%span= menu_item.title