Commit 4d11e42a authored by Gilang Gumilar's avatar Gilang Gumilar

Rearrange group_analytics_navbar_links helper method

parent 35b18fe2
- navbar_links = links.sort_by(&:title)
- all_paths = navbar_links.map(&:path) - all_paths = navbar_links.map(&:path)
- if navbar_links.any? - if navbar_links.any?
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
= render_if_exists 'groups/sidebar/packages' = render_if_exists 'groups/sidebar/packages'
= render 'layouts/nav/sidebar/analytics_links', links: group_analytics_navbar_links(@group, current_user) = render 'layouts/nav/sidebar/analytics_links', navbar_links: group_analytics_navbar_links(@group, current_user)
- if group_sidebar_link?(:group_members) - if group_sidebar_link?(:group_members)
= nav_link(path: 'group_members#index') do = nav_link(path: 'group_members#index') do
......
...@@ -16,11 +16,11 @@ module EE ...@@ -16,11 +16,11 @@ module EE
override :group_analytics_navbar_links override :group_analytics_navbar_links
def group_analytics_navbar_links(group, current_user) def group_analytics_navbar_links(group, current_user)
super + [ super + [
group_cycle_analytics_navbar_link(group, current_user),
issues_analytics_navbar_link(group, current_user),
contribution_analytics_navbar_link(group, current_user), contribution_analytics_navbar_link(group, current_user),
group_insights_navbar_link(group, current_user), group_insights_navbar_link(group, current_user),
issues_analytics_navbar_link(group, current_user),
productivity_analytics_navbar_link(group, current_user), productivity_analytics_navbar_link(group, current_user),
group_cycle_analytics_navbar_link(group, current_user)
].compact ].compact
end end
......
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