Module: Admin::AssetsHelper

Defined in:
app/helpers/admin/assets_helper.rb

Instance Method Summary collapse

Instance Method Details



12
13
14
# File 'app/helpers/admin/assets_helper.rb', line 12

def asset_attachment_link(asset)
  link_to t("clipped_extension.attach"), new_admin_page_attachment_path(:asset_id => asset.id), :class => 'attach_asset', :rel => "attach_#{asset.id}"
end


7
8
9
10
# File 'app/helpers/admin/assets_helper.rb', line 7

def asset_insertion_link(asset)
  radius_tag = asset.asset_type.default_radius_tag || 'link';
  link_to t('clipped_extension.insert'), '#', :class => 'insert_asset', :rel => "#{radius_tag}_#{Radiant.config['assets.insertion_size']}_#{asset.id}"
end

#automatic_size_descriptionsObject



3
4
5
# File 'app/helpers/admin/assets_helper.rb', line 3

def automatic_size_descriptions
  Asset.thumbnail_sizes.collect{|k,v| "#{k} (#{(v.to_s).match(/\d+x\d+/)})"}.join(', ')
end