
<% if attachments.nil? || attachments.empty? %>
    <!--<p class="nodata">-->
    <!--<%#= l(:label_no_data) %>-->
    <!--</p>-->
<% else %>
    <% attachments.each do |attach| %>
        <ul class="resourcesList" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
          <li class="resourcesListCheckbox fl">
            <input name="checkbox1[]" type="checkbox" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N'  %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
          </li>
          <li class="resourcesListName fl">
            <!--<a href="javascript:void(0);" class="resourcesBlack"><%#=truncate(attach.filename,:length=>18)%></a>-->
            <%= link_to truncate(attach.filename,:length=>30), download_named_attachment_path(attach.id, attach.filename),
                        :title => attach.filename,:class=>'resourcesBlack'%>
          </li>
          <li class="resourcesListSize fl"><%= number_to_human_size(attach.filesize) %></li>
          <li class="resourcesListType fl"><%= get_resource_type(attach.container_type)%></li>
          <li class="resourcesListUploader fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
          <li style="display: none"><%= attach.author_id %></li>
          <li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
          <li style="display: none"><%= attach.id %></li>
        </ul>
        <ul class="resourcesListDashLine"></ul>

    <% end %>
<% end %>
