engine/app/views/admin/assets/_form.html.haml

18 lines
633 B
Plaintext
Raw Normal View History

2010-05-12 00:16:39 +00:00
= f.inputs :name => :information do
= f.input :name
= f.input :source
- unless @asset.custom_fields.empty?
= f.inputs :name => :other_fields do
- @asset.custom_fields.each do |field|
- if field.string?
= f.input field._alias.to_sym, :label => field.label
- elsif field.text?
= f.input field._alias.to_sym, :label => field.label, :as => :text
- if @asset.image? && @asset.valid?
2010-05-12 00:16:39 +00:00
= f.foldable_inputs :name => "#{t('formtastic.titles.preview')} #{image_dimensions_and_size(@asset)}", :class => 'preview' do
%li
.image
.inside
= image_tag(@asset.source.url(:preview))