boissier_app/app/helpers/admin/icon_helper.rb
Nicolas Bally 6abf7679fd initial
2011-05-14 13:36:30 +02:00

20 lines
334 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
"/iconic/"+color.to_s+"/"+name.to_s+"_"+s+".png"
end
end