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/static_menu.rb')
-rw-r--r--lib/sidebars/static_menu.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sidebars/static_menu.rb b/lib/sidebars/static_menu.rb
new file mode 100644
index 00000000000..b7ba69b1717
--- /dev/null
+++ b/lib/sidebars/static_menu.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Sidebars
+ # This is a special menu which does not serialize as
+ # a section and instead hoists all of menu items
+ # to be top-level items
+ class StaticMenu < ::Sidebars::Menu
+ override :serialize_for_super_sidebar
+ def serialize_for_super_sidebar
+ serialize_items_for_super_sidebar
+ end
+ end
+end