_upload_file_form.rhtml 904 Bytes
<% if @parent %>
  <%= hidden_field_tag('parent_id', @parent.id) %>
<% else %>
  <h4><%= _('Choose folder to upload files:') %></h4>
  <%= select_tag('parent_id', options_for_select([[profile.identifier, '']] + @folders.collect {|f| [ profile.identifier + '/' +  f.full_name, f.id ] })) %>
<% end %>

<div id='uploaded_files'>
  <% 3.times do %>
    <%= render :partial => 'upload_file', :locals => {:size => size} %>
  <% end %>
</div>

<%= hidden_field_tag('back_to', @back_to) if @back_to %>

<% button_bar do %>
  <%= add_upload_file_field(_('More files'), {:size => size}) %>
  <% if @back_to == 'media_listing' %>
    <%= submit_button :save, _('Upload') %>
  <% elsif @back_url %>
    <%= submit_button :save, _('Upload'), :cancel => @back_url %>
  <% else %>
    <%= submit_button :save, _('Upload'), :cancel => {:action => (@parent ? 'view' : 'index'), :id => @parent } %>
  <% end %>
<% end %>