summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
blob: db70109714ffea5dff997252810da186fdbca372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module ApplicationHelper

  #
  # markup for bootstrap icon
  #
  # http://twitter.github.io/bootstrap/base-css.html#icons
  #
  def icon(name, color=nil)
    if color.nil?
      color_class = nil
    elsif color == :black
      color_class = 'icon-black'
    elsif color == :white
      color_class = 'icon-white'
    end
    "<i class=\"icon-#{name} #{color_class}\"></i> ".html_safe
  end

end