module Golden::Theme::Bootstrap::TabHelper

Public Instance Methods

bootstrap_remote_tab_nav(text, url, tag_id, default) click to toggle source
# File lib/golden/theme/bootstrap/tab_helper.rb, line 40
def bootstrap_remote_tab_nav text, url, tag_id, default
  active = current_page?(url) || tag_id == default
  li_class = 'active' if active
  [ bootstrap_remote_tab_link_to(text, url, "##{tag_id}"), { class: li_class } ]
end
bootstrap_remote_tab_pane(url, tag_id, default) { |active| ... } click to toggle source
# File lib/golden/theme/bootstrap/tab_helper.rb, line 46
def bootstrap_remote_tab_pane url, tag_id, default
  active = current_page?(url) || tag_id == default
  tab_class = 'tab-pane fade'
  tab_class << ' active in' if active
  content_tag :div, class: tab_class, id: tag_id do
    yield active if block_given?
  end
end
bootstrap_tab_nav(text, tag_id, default) click to toggle source
# File lib/golden/theme/bootstrap/tab_helper.rb, line 13
def bootstrap_tab_nav text, tag_id, default
  active = tag_id == default
  li_class = 'active' if active
  [ bootstrap_tab_link_to(text, "##{tag_id}"), { class: li_class } ]
end
bootstrap_tab_pane(tag_id, default) { |active| ... } click to toggle source
# File lib/golden/theme/bootstrap/tab_helper.rb, line 19
def bootstrap_tab_pane tag_id, default
  active = tag_id == default
  tab_class = 'tab-pane fade'
  tab_class << ' active in' if active
  content_tag :div, class: tab_class, id: tag_id do
    yield active if block_given?
  end
end