2010-05-11 21:38:52 +00:00
|
|
|
module Admin::AssetsHelper
|
|
|
|
|
|
|
|
def vignette_tag(asset)
|
2010-06-02 14:31:01 +00:00
|
|
|
image_tag(asset.vignette_url)
|
2010-05-11 21:38:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def image_dimensions_and_size(asset)
|
2010-07-13 00:46:17 +00:00
|
|
|
content_tag(:small, "#{asset.width}px x #{asset.height}px | #{number_to_human_size(asset.size)}")
|
2010-05-11 21:38:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def allow_plain_text_editing?(asset)
|
|
|
|
asset.new_record? || asset.stylesheet? || asset.javascript?
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|