Module: BootstrapLeather::IconsHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/bootstrap_leather/icons_helper.rb

Overview

Icons, i.e. tiny images from fonts

Instance Method Summary collapse

Instance Method Details

#icon(type) ⇒ Object



6
7
8
# File 'app/helpers/bootstrap_leather/icons_helper.rb', line 6

def icon(type)
  render(partial: 'bootstrap_leather/icons/icon', locals: { type: type })
end

#icon_button_to(button_class, icon_type, text, link, html_options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/bootstrap_leather/icons_helper.rb', line 10

def icon_button_to(button_class, icon_type, text, link, html_options = {})
  html_options[:class] = 'btn btn-' + button_class
  render(
    partial: 'bootstrap_leather/icons/icon_button_to',
    locals: {
      button_class: button_class, icon_type: icon_type, text: text,
      link: link, html_options: html_options
    }
  )
end


21
22
23
24
25
26
27
28
29
30
31
# File 'app/helpers/bootstrap_leather/icons_helper.rb', line 21

def icon_link_to(icon_type, text, link, html_options = {})
  render(
    partial: 'bootstrap_leather/icons/icon_link_to',
    locals: {
      icon_type: icon_type,
      text: text,
      link: link,
      html_options: html_options
    }
  )
end