= semantic_form_for [:admin, asset] do |f| = f.inputs "Asset" do %li %label.label Asset %p.inline-hints= effective_asset_image_tag(asset, nil, {:height => 100, :width => 100}) %li %label.label Uploaded by %p - if defined? User = asset.try(:user) = f.input :title, :hint => "Give this asset a title" = f.input :description, :as => :string, :hint => "Give this asset a description" = f.input :tags, :hint => "Used for searching and filtering. Separate multiple tags with a comma (i.e. blue,car,ford)" = f.input :content_type, :hint => "The computer detected type of file. Be careful when changing this value as you may break things." %li %label.label Files %p.inline-hints{:style => 'font-style: normal'} - if asset.image? = link_to "Original", _effective_asset_image_url(asset), :class => 'asset-insertable', :data => {'asset-id' => asset.id, 'asset' => effective_asset_image_tag(asset)} = "#{asset.width || '?'}x#{asset.height || '?'}px #{number_to_human_size(asset.data_size, :precision => 3)}" - asset.versions_info.each do |version, attributes| %br = link_to "#{version.to_s.gsub('_',' ').titleize}", _effective_asset_image_url(asset, version), :class => 'asset-insertable', :data => {'asset-id' => asset.id, 'asset' => effective_asset_image_tag(asset, version) } = "#{attributes[:width]}x#{attributes[:height]}px #{number_to_human_size(attributes[:data_size], :precision => 3)}" - elsif asset.icon? = link_to asset.file_name, asset.image, :class => 'asset-insertable', :data => {'asset-id' => asset.id, 'asset' => effective_asset_image_tag(asset)} = "#{number_to_human_size(asset.data_size, :precision => 3)}" - elsif asset.video? = link_to asset.file_name, asset.url, :class => 'asset-insertable', :data => {'asset-id' => asset.id, 'asset' => effective_asset_video_tag(asset)} = "#{number_to_human_size(asset.data_size, :precision => 3)}" - else = link_to asset.file_name, asset.url, :class => 'asset-insertable', :data => {'asset-id' => asset.id, 'asset' => effective_asset_link_to(asset)} = "#{number_to_human_size(asset.data_size, :precision => 3)}" = f.actions :submit, :cancel