debian-mirror-gitlab/lib/sidebars/projects/menus/confluence_menu.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
944 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
module Sidebars
module Projects
module Menus
class ConfluenceMenu < ::Sidebars::Menu
override :link
def link
project_wikis_confluence_path(context.project)
end
override :extra_container_html_options
def extra_container_html_options
{
class: 'shortcuts-confluence'
}
end
override :title
def title
_('Confluence')
end
override :image_path
def image_path
'confluence.svg'
end
override :image_html_options
def image_html_options
{
alt: title
}
end
override :render?
def render?
context.project.has_confluence?
end
2021-12-11 22:18:48 +05:30
override :active_routes
def active_routes
{ controller: :confluences }
end
2021-06-08 01:23:25 +05:30
end
end
end
end