18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'app/helpers/bar_helper.rb', line 18
def f7_toolbar(options={}, &block)
@f7_bartype = :toolbar
css_classes = []
css_classes << @f7_bartype
css_classes += [options[:class]] if options[:class]
css_classes.flatten!
@f7_bartype = :tabbar if options[:type].to_s.include?('tabbar')
if @f7_bartype == :tabbar
css_classes << 'tabbar'
if options[:type] == :tabbar_labels
css_classes << 'tabbar-labels'
@has_labels = true
end
end
options[:class] = css_classes
div_options = options.reject { |k, v| [:type].include? k }
content_tag :div, div_options do
content_tag :div, :class => ['toolbar-inner'] do
yield if block_given?
end
end
end
|