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

17 lines
601 B
Text
Raw Normal View History

2020-03-09 13:42:32 +05:30
- 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' } }
- 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