diff options
Diffstat (limited to 'app/views/layouts/nav/sidebar/_project_analytics_link.html.haml')
-rw-r--r-- | app/views/layouts/nav/sidebar/_project_analytics_link.html.haml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/layouts/nav/sidebar/_project_analytics_link.html.haml b/app/views/layouts/nav/sidebar/_project_analytics_link.html.haml new file mode 100644 index 00000000000..3eb8c024588 --- /dev/null +++ b/app/views/layouts/nav/sidebar/_project_analytics_link.html.haml @@ -0,0 +1,16 @@ +- navbar_sub_item = project_analytics_navbar_links(@project, current_user).sort_by(&:title) +- all_paths = navbar_sub_item.map(&:path) + +- if navbar_sub_item.any? + = nav_link(path: all_paths) do + = link_to navbar_sub_item.first.link, data: { qa_selector: 'project_analytics_link' } do + .nav-icon-container + = sprite_icon('chart') + %span.nav-item-name + = _('Analytics') + + %ul.sidebar-sub-level-items + - navbar_sub_item.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 |