require 'active_support/core_ext/string'
module Tabulous
class DefaultRenderer < SplitRenderer
def tabs_html
<<-HTML.strip_heredoc
HTML
end
def subtabs_html
<<-HTML.strip_heredoc
HTML
end
protected
def tab_html(tab)
return '' unless tab.visible?(@view)
html = ''
klass = ''
klass << 'active' if tab.active?(@view)
klass << ' disabled' unless tab.enabled?(@view)
klass.strip!
if klass.empty?
html << ''
else
html << %Q{}
end
if tab.clickable?(@view)
html << %Q{#{tab_text(tab)}}
else
html << %Q{#{tab_text(tab)}}
end
html << ""
html
end
end
end