<%= form_tag( url_for({:controller => 'users', :action => 'import_into_container',
                       :mul_id => @resource_id,
                       :mul_type => @resource_type}),
              :method => 'post',  :id => 'resource_import_container_form') do %>
    <% @attachments.each do |attach| %>
        <ul class="subjectRow">
          <li class="subjectName fl hidden">
            <label>
              <input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N'  %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;"  />
              <span>
                <%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
              </span>
            </label>
          </li>
          <li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>
          <li class="subjectCount fl hidden"><%= (number_to_human_size(attach.filesize)).gsub("ytes", "") %></li>
          <li class="subjectPublisher fl hidden"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
          <li class="fl subjectDate"><%= format_date(attach.created_on) %></li>
        </ul>
    <% end %>
<% end %>