Class: Layouts::Admin::Tabs

Inherits:
Minimal::Template
  • Object
show all
Defined in:
app/views/layouts/admin/_tabs.html.rb

Instance Method Summary collapse

Instance Method Details

#to_htmlObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/views/layouts/admin/_tabs.html.rb', line 2

def to_html
  div :class => :tabs do
    ul do
      tabs.each do |tab|
        li(:class => tab.active? ? :active : '') do
          link_to(:"admin.sidebar.tabs.#{tab.name}", "##{tab.name}")
        end
      end
    end
    # tabs.each do |tab|
    #   div :id => tab.name, :class => "tab #{tab.active? ? :active : ''}" do
    #     # div { tab.blocks.each { |block| block.call } }
    #   end
    # end
  end
end