<%= content_tag(:div, :id => field.id, :class => "uploader-dnd-area") do -%> <%= hidden_field(field.object_name, :fileupload_guid, :object => field.object) if field.object.new_record? %>
<%= I18n.t('uploader.button') %> <%= fields_for field.object do |f| -%> <%= f.fields_for field.method_name, field.klass.new do |m| -%> <%= m.file_field(:data, field.input_html) %> <% end -%> <% end -%>
<%= I18n.t('uploader.or') %><%= I18n.t('uploader.drop') %>
<%= render :partial => "uploader/#{field.theme}/upload", :locals => {:field => field} %> <%= render :partial => "uploader/#{field.theme}/download", :locals => {:field => field} %> <%= render :partial => "uploader/#{field.theme}/sortable", :locals => {:field => field} if field.sortable? %> <% end -%>