Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sidebars/projects/menus/shimo_menu.rb')
-rw-r--r--lib/sidebars/projects/menus/shimo_menu.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/sidebars/projects/menus/shimo_menu.rb b/lib/sidebars/projects/menus/shimo_menu.rb
new file mode 100644
index 00000000000..c93c4f6a0a4
--- /dev/null
+++ b/lib/sidebars/projects/menus/shimo_menu.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+module Sidebars
+ module Projects
+ module Menus
+ class ShimoMenu < ::Sidebars::Menu
+ override :link
+ def link
+ project_integrations_shimo_path(context.project)
+ end
+
+ override :title
+ def title
+ s_('Shimo|Shimo')
+ end
+
+ override :image_path
+ def image_path
+ 'logos/shimo.svg'
+ end
+
+ override :image_html_options
+ def image_html_options
+ {
+ size: 16
+ }
+ end
+
+ override :render?
+ def render?
+ context.project.has_shimo?
+ end
+
+ override :active_routes
+ def active_routes
+ { controller: :shimo }
+ end
+ end
+ end
+ end
+end