module Golden::Theme::Bootstrap::TabHelper
Public Instance Methods
bootstrap_remote_tab_link_to(text, url, tab_pane_id, options = {})
click to toggle source
# File lib/golden/theme/bootstrap/tab_helper.rb, line 28 def bootstrap_remote_tab_link_to text, url, tab_pane_id, options = {} options = { remote: true, data: { toggle: 'tab', target: tab_pane_id, type: 'html' } }.deep_merge options link_to text, url, options 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_link_to(text, tab_pane_id, options = {})
click to toggle source
# File lib/golden/theme/bootstrap/tab_helper.rb, line 3 def bootstrap_tab_link_to text, tab_pane_id, options = {} options = { data: { toggle: 'tab', target: tab_pane_id } }.deep_merge options link_to text, tab_pane_id, options 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