Sha256: f481f795c5d4dfdc617aebeae1152ec57f077c4db7bc361a1fbbb93a54aff11b
Contents?: true
Size: 614 Bytes
Versions: 29
Compression:
Stored size: 614 Bytes
Contents
format :html do def labeled_badge count, label, opts={} haml :labeled_badge, badge_haml_opts(count, label, opts) end def tab_badge count, label, opts={} haml :tab_badge, badge_haml_opts(count, label, opts) end def badge_haml_opts count, label, opts process_badge_opts count, opts { count: count, label: label, klass: opts[:klass], color: opts[:color], title: opts[:title] } end def process_badge_opts count, opts if count.try(:zero?) && !opts[:zero_ok] opts[:klass] = [opts[:klass], "disabled-o"].compact.join " " end opts[:color] ||= "secondary" end end
Version data entries
29 entries across 29 versions & 2 rubygems