20 lines
334 B
Ruby
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
|