<% form_id = "fileupload_#{object.id}" form_id += sub_type.to_s unless sub_type.blank? %> <% index_url = url_for(:controller => "/datafiles", "datafile[owner_type]" => "#{object.class.name.to_s}", "datafile[owner_id]" => "#{object.id.to_s}", "datafile[sub_type]" => sub_type) %> <% #if is_tree_node?(object) # tree_node = object # unless tree_node.blank? # bread_crumb_load_tree_recursive(breadcrumb, tree_node) # end #elsif object.respond_to?(:tree_nodes) # if !object.tree_nodes.blank? && !object.tree_nodes.first.blank? && is_tree_node?(object.tree_nodes.first) # tree_node = object.tree_nodes.first if !object.tree_nodes.blank? && !object.tree_nodes.first.blank? # end #end tree_node = { :resource_type => "#{object.class.name.to_s}", :resource_id => "#{object.id.to_s}"} tree_node[:sub_type] = sub_type unless sub_type.blank? %> <% if !tree_node.blank? %> <% end %> <%= form_for Datafile.new, :html => {:multipart => true, :id => "#{form_id}"} do |f| %> <% if can_upload %>
<%= t('itl-gem.multi_upload.add_files') %> <%= text_field_tag "datafile[owner_type]", "#{object.class.name.to_s}" %> <%= text_field_tag "datafile[owner_id]", "#{object.id.to_s}" %> <%= hidden_field_tag "datafile[sub_type]", sub_type unless sub_type.nil? %> <%= f.file_field :file, :multiple => true %> <%#= f.file_field :file%>
<% end %>

<%= t('itl-gem.multi_upload.preview') %> <%= t('itl-gem.multi_upload.file_name') %> <%= t('itl-gem.multi_upload.created_at') %> <%= t('itl-gem.multi_upload.size') %>
<% end %> <%= javascript_include_tag 'backbone_js/jquery.ui.widget.js' %> <%= javascript_include_tag 'backbone_js/tmpl.min.js' %> <%= javascript_include_tag 'backbone_js/load-image.min.js' %> <%= javascript_include_tag 'backbone_js/jquery.iframe-transport.js' %> <%= javascript_include_tag 'backbone_js/jquery.fileupload.js' %> <%= javascript_include_tag 'backbone_js/jquery.fileupload-ui.js' %>