2021-07-19 11:09:40 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Sidebars
|
|
|
|
module Groups
|
|
|
|
module Menus
|
|
|
|
class ScopeMenu < ::Sidebars::Menu
|
|
|
|
override :link
|
|
|
|
def link
|
|
|
|
group_path(context.group)
|
|
|
|
end
|
|
|
|
|
|
|
|
override :title
|
|
|
|
def title
|
|
|
|
context.group.name
|
|
|
|
end
|
|
|
|
|
|
|
|
override :active_routes
|
|
|
|
def active_routes
|
|
|
|
{ path: %w[groups#show groups#details] }
|
|
|
|
end
|
|
|
|
|
|
|
|
override :extra_nav_link_html_options
|
|
|
|
def extra_nav_link_html_options
|
2021-09-27 02:09:35 -04:00
|
|
|
{
|
|
|
|
class: 'context-header has-tooltip',
|
|
|
|
title: context.group.name,
|
|
|
|
data: { container: 'body', placement: 'right' }
|
|
|
|
}
|
2021-07-19 11:09:40 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
override :render?
|
|
|
|
def render?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|