<%= form_for [:admin, @resource], :url => @url_override || @url, :html => {:multipart => true} do |f| -%> <%= render :partial => "/shared/admin/error_messages", :locals => { :object => @resource, :include_object_name => false } %>
<% if action_name =~ /(edit)|(update)/ %> <%= link_to t('.download_current'), @resource.url, :title => @resource.title %> <%= t('.or')%><%= t('.replace') %> <%= f.file_field :file %> <% else %> <% # we must only hint at multiple when it's a *new* record otherwise update fails. %> <%= f.file_field :file, :multiple => (true unless @resource.persisted?) %> <% end %>
<%= render :partial => "/shared/admin/form_actions", :locals => { :f => f, :continue_editing => false, :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?), :delete_title => t('delete', :scope => 'admin.resources'), :delete_confirmation => (t('message', :scope => 'shared.admin.delete', :title => @resource.title) if @resource.persisted?) } %> <% if @app_dialog -%> <% end -%> <% end -%> <% content_for :javascripts do %> <% end if from_dialog? %>