blog_perso_app/app/helpers/admin/icon_helper.rb
Nicolas Bally 56a0aa9848 initial
2012-06-17 21:11:12 +02:00

20 lines
348 B
Ruby

# -*- encoding : utf-8 -*-
module Admin::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