
<% if attachments.nil? || attachments.empty? %>
    <!--<p class="nodata">-->
    <!--<%#= l(:label_no_data) %>-->
    <!--</p>-->
<% else %>
    <% attachments.each do |attach| %>
        <ul class="resourcesList">
          <li class="resourcesListCheckbox fl">
            <input name="checkbox1[]" type="checkbox" onclick="store_seleted_resource($(this));" <%=seleted_resources.include?(attach.id.to_s) ? 'checked':''  %> 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>
    <% end %>
<% end %>
