site_perso_app/app/helpers/icon_helper.rb
2013-02-07 11:44:54 +01:00

20 lines
341 B
Ruby

# -*- encoding : utf-8 -*-
module IconHelper
def i(name,color=:gray_dark, size=16)
image_tag(i_path(name,color,size))
end
def i_path(name,color=:gray_dark, size=16)
if size.kind_of?(Integer)
s = size.to_s+"x"+size.to_s
else
s = size.to_s
end
"/assets/shared/iconic/"+color.to_s+"/"+name.to_s+"_"+s+".png"
end
end