Commit ae451983 authored by Gilang Gumilar's avatar Gilang Gumilar

Make value stream the default link of Analytics sidebar item menu

parent 748eeb27
- navbar_links = links.sort_by { |link| [link.link_to_options.fetch(:data, {}).fetch(:priority, 0), link.title] }
- navbar_links = links.sort_by(&:title)
- all_paths = navbar_links.map(&:path)
- analytics_link = navbar_links.select { |link| link.title == _('Value Stream') }.first || navbar_links.first
- if navbar_links.any?
= nav_link(path: all_paths) do
= link_to navbar_links.first.link do
= link_to analytics_link.link do
.nav-icon-container
= sprite_icon('chart')
%span.nav-item-name{ data: { qa_selector: 'analytics_link' } }
......@@ -12,6 +14,8 @@
%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
= nav_link(path: analytics_link.path, html_options: { class: "fly-out-top-item" } ) do
= link_to analytics_link.link do
%strong.fly-out-top-item-name
= _('Analytics')
%li.divider.fly-out-top-item
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment