2020-04-21 11:21:10 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Analytics
|
|
|
|
module NavbarHelper
|
|
|
|
class NavbarSubItem
|
|
|
|
attr_reader :title, :path, :link, :link_to_options
|
|
|
|
|
|
|
|
def initialize(title:, path:, link:, link_to_options: {})
|
|
|
|
@title = title
|
|
|
|
@path = path
|
|
|
|
@link = link
|
|
|
|
@link_to_options = link_to_options.merge(title: title)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def group_analytics_navbar_links(group, current_user)
|
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def navbar_sub_item(args)
|
2020-09-29 14:09:52 -04:00
|
|
|
NavbarSubItem.new(**args)
|
2020-04-21 11:21:10 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
Analytics::NavbarHelper.prepend_mod_with('Analytics::NavbarHelper')
|