engine/app/helpers/admin/assets_helper.rb

22 lines
704 B
Ruby
Raw Normal View History

2010-05-11 21:38:52 +00:00
module Admin::AssetsHelper
2010-05-11 21:38:52 +00:00
def vignette_tag(asset)
image_tag(asset.vignette_url)
2010-05-11 21:38:52 +00:00
end
2010-05-11 21:38:52 +00:00
def image_dimensions_and_size(asset)
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
2010-05-11 21:38:52 +00:00
def allow_plain_text_editing?(asset)
asset.new_record? || asset.stylesheet? || asset.javascript?
end
2010-07-17 22:01:00 +00:00
def image_picker_include_tags
html = javascript_include_tag 'admin/plugins/json2', 'admin/plugins/scrollTo', 'admin/plugins/codemirror/codemirror', 'admin/plugins/fancybox', 'admin/plugins/plupload/plupload.full', 'admin/plugins/imagepicker'
html += stylesheet_link_tag 'admin/plugins/fancybox', 'admin/fancybox_changes'
2010-07-17 22:01:00 +00:00
html
end
end