debian-mirror-gitlab/lib/sidebars/groups/menus/scope_menu.rb
2021-11-18 22:05:49 +05:30

38 lines
788 B
Ruby

# 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
{
class: 'context-header has-tooltip',
title: context.group.name,
data: { container: 'body', placement: 'right' }
}
end
override :render?
def render?
true
end
end
end
end
end