Module: Admin::AssetsHelper
- Defined in:
- app/helpers/admin/assets_helper.rb
Instance Method Summary collapse
- #asset_attachment_link(asset) ⇒ Object
- #asset_insertion_link(asset) ⇒ Object
- #automatic_size_descriptions ⇒ Object
Instance Method Details
#asset_attachment_link(asset) ⇒ Object
12 13 14 |
# File 'app/helpers/admin/assets_helper.rb', line 12 def (asset) link_to t("clipped_extension.attach"), (:asset_id => asset.id), :class => 'attach_asset', :rel => "attach_#{asset.id}" end |
#asset_insertion_link(asset) ⇒ Object
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_descriptions ⇒ Object
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 |