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/groups/menus/scope_menu.rb')
-rw-r--r--lib/sidebars/groups/menus/scope_menu.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/sidebars/groups/menus/scope_menu.rb b/lib/sidebars/groups/menus/scope_menu.rb
new file mode 100644
index 00000000000..02c359e3c99
--- /dev/null
+++ b/lib/sidebars/groups/menus/scope_menu.rb
@@ -0,0 +1,34 @@
+# 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' }
+ end
+
+ override :render?
+ def render?
+ true
+ end
+ end
+ end
+ end
+end