Module: Admin::MenuHelper

Includes:
PagesCore::LocalesHelper
Defined in:
app/helpers/admin/menu_helper.rb

Instance Method Summary collapse

Methods included from PagesCore::LocalesHelper

#content_locale

Instance Method Details

#header_tabs(group) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/admin/menu_helper.rb', line 7

def header_tabs(group)
  return unless menu_items_for(group).any?

  tag.ul(class: group.to_s) do
    safe_join(menu_items_for(group).map do |item|
      tag.li do
        path = instance_eval(&item.path)
        link_to(item.label, path,
                class: (current_menu_item?(item) ? "current" : ""))
      end
    end)
  end
end