debian-mirror-gitlab/app/views/layouts/nav/sidebar/_analytics_links.html.haml
2020-04-08 18:37:08 +05:30

21 lines
847 B
Text

- navbar_links = links.sort_by(&:title)
- all_paths = navbar_links.map(&:path)
- if navbar_links.any?
= nav_link(path: all_paths) do
= link_to navbar_links.first.link do
.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' } }
= nav_link(path: navbar_links.first.path, html_options: { class: "fly-out-top-item" } ) do
= link_to navbar_links.first.link do
%strong.fly-out-top-item-name
= _('Analytics')
%li.divider.fly-out-top-item
- 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