Class: Decidim::Admin::SecondaryMenuPresenter

Inherits:
MenuPresenter show all
Defined in:
decidim-admin/app/presenters/decidim/admin/secondary_menu_presenter.rb

Instance Method Summary collapse

Methods inherited from MenuPresenter

#evaluated_menu, #initialize

Constructor Details

This class inherits a constructor from Decidim::MenuPresenter

Instance Method Details

#render(render_options = {}, &block) ⇒ Object


6
7
8
9
10
11
12
13
14
15
# File 'decidim-admin/app/presenters/decidim/admin/secondary_menu_presenter.rb', line 6

def render(render_options = {}, &block)
  styles = %w(secondary-nav)
  styles.push "secondary-nav--subnav" unless render_options.fetch(:title, false)
   :div, class: styles.join(" ") do
    output = []
    output.push render_title(render_options) if render_options.fetch(:title, false)
    output.push render_menu(&block)
    safe_join(output)
  end
end