diff options
Diffstat (limited to 'lib/sidebars/projects/menus/zentao_menu.rb')
-rw-r--r-- | lib/sidebars/projects/menus/zentao_menu.rb | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/lib/sidebars/projects/menus/zentao_menu.rb b/lib/sidebars/projects/menus/zentao_menu.rb index db9e60326a4..1b5ba900a86 100644 --- a/lib/sidebars/projects/menus/zentao_menu.rb +++ b/lib/sidebars/projects/menus/zentao_menu.rb @@ -4,11 +4,6 @@ module Sidebars module Projects module Menus class ZentaoMenu < ::Sidebars::Menu - override :configure_menu_items - def configure_menu_items - render?.tap { |render| add_items if render } - end - override :link def link zentao_integration.url @@ -16,7 +11,7 @@ module Sidebars override :title def title - s_('ZentaoIntegration|ZenTao issues') + s_('ZentaoIntegration|ZenTao') end override :title_html_options @@ -26,9 +21,9 @@ module Sidebars } end - override :image_path - def image_path - 'logos/zentao.svg' + override :sprite_icon + def sprite_icon + 'external-link' end # Hardcode sizes so image doesn't flash before CSS loads https://gitlab.com/gitlab-org/gitlab/-/issues/321022 @@ -46,29 +41,11 @@ module Sidebars zentao_integration.active? end - def add_items - add_item(open_zentao_menu_item) - end - private def zentao_integration @zentao_integration ||= context.project.zentao_integration end - - def open_zentao_menu_item - ::Sidebars::MenuItem.new( - title: s_('ZentaoIntegration|Open ZenTao'), - link: zentao_integration.url, - active_routes: {}, - item_id: :open_zentao, - sprite_icon: 'external-link', - container_html_options: { - target: '_blank', - rel: 'noopener noreferrer' - } - ) - end end end end |