diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/models/sidebars/panel.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/models/sidebars/panel.rb')
-rw-r--r-- | app/models/sidebars/panel.rb | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/app/models/sidebars/panel.rb b/app/models/sidebars/panel.rb deleted file mode 100644 index 5c8191ebda3..00000000000 --- a/app/models/sidebars/panel.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -module Sidebars - class Panel - extend ::Gitlab::Utils::Override - include ::Sidebars::PositionableList - - attr_reader :context, :scope_menu, :hidden_menu - - def initialize(context) - @context = context - @scope_menu = nil - @hidden_menu = nil - @menus = [] - - configure_menus - end - - def configure_menus - # No-op - end - - def add_menu(menu) - add_element(@menus, menu) - end - - def insert_menu_before(before_menu, new_menu) - insert_element_before(@menus, before_menu, new_menu) - end - - def insert_menu_after(after_menu, new_menu) - insert_element_after(@menus, after_menu, new_menu) - end - - def set_scope_menu(scope_menu) - @scope_menu = scope_menu - end - - def set_hidden_menu(hidden_menu) - @hidden_menu = hidden_menu - end - - def aria_label - raise NotImplementedError - end - - def has_renderable_menus? - renderable_menus.any? - end - - def renderable_menus - @renderable_menus ||= @menus.select(&:render?) - end - - def container - context.container - end - - # Auxiliar method that helps with the migration from - # regular views to the new logic - def render_raw_scope_menu_partial - # No-op - end - - # Auxiliar method that helps with the migration from - # regular views to the new logic. - # - # Any menu inside this partial will be added after - # all the menus added in the `configure_menus` - # method. - def render_raw_menus_partial - # No-op - end - end -end |