Module: Kadmin::BootstrapHelper

Defined in:
app/helpers/kadmin/bootstrap_helper.rb

Overview

Collection of Bootstrap helpers

Instance Method Summary collapse

Instance Method Details

#glyphicon(icon) ⇒ Object



6
7
8
# File 'app/helpers/kadmin/bootstrap_helper.rb', line 6

def glyphicon(icon)
  return (:span, ' ', class: "glyphicon glyphicon-#{icon}", 'aria-hidden': 'true')
end

#glyphicon_if_else(condition, icon_true, icon_false) ⇒ Object



13
14
15
# File 'app/helpers/kadmin/bootstrap_helper.rb', line 13

def glyphicon_if_else(condition, icon_true, icon_false)
  return condition ? glyphicon(icon_true) : glyphicon(icon_false)
end


19
20
21
# File 'app/helpers/kadmin/bootstrap_helper.rb', line 19

def thumbnail_link(url_options, max_height)
  return link_to(image_tag(url_options), url_options, class: 'thumbnail', style: "max-height: #{max_height}px", target: 'new')
end