<% delete_allowed = User.current.allowed_to?(:manage_files, project) %> <% project_attachments.each do |file| %> <% if file.is_public? || User.current.member_of?(project) || User.current.admin? %>
<%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
<%= link_to truncate(file.filename,length: 35, omission: '...'), download_named_attachment_path(file.id, file.filename), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %> <%= file_preview_eye(file, class: 'preview') %> <% if file.is_public? == false%> 私有 <%end %>
上传时间:<%= format_time(file.created_on)%> <% if file.tag_list.length > 0%> 上传类型:<%= file.tag_list[0] %> <% end %>

文件大小:<%= number_to_human_size(file.filesize) %>

下载<%= file.downloads%>  |  引用<%= file.quotes.nil? ? 0:file.quotes %>

<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %> <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
<%= render :partial => 'files/tool_settings', :locals => {:project => @project, :delete_allowed => delete_allowed, :file => file} %>
<% else %>
<%= file.filename %>是私有资源
<% end %> <% end %> <% if project_attachments.count == 10%> <% if params[:action] == 'search_project' %> <%=link_to "点击展开更多", search_project_project_files_path({:project_id => project.id, :page => @obj_pages.nil? ? @feedback_pages.page + 1 : @obj_pages.page + 1}.merge(params)),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %> <%else%> <%=link_to "点击展开更多", project_files_path(:project_id => project.id,:page => @page),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %> <%end%> <% end%>