2014-05-14 15:16:11 +08:00
|
|
|
<% selAttachType =@attachtype %>
|
|
|
|
<% selContentType =@contenttype %>
|
2014-05-14 15:03:04 +08:00
|
|
|
<% attachmenttypes = @project.attachmenttypes %>
|
2014-05-13 11:54:21 +08:00
|
|
|
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
2014-05-13 15:49:14 +08:00
|
|
|
<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
2014-08-22 10:20:30 +08:00
|
|
|
<div class="autoscroll">
|
2014-08-22 14:20:45 +08:00
|
|
|
<table class="list files" id="ver-zebra" style=" table-layout: fixed">
|
2014-05-14 17:12:04 +08:00
|
|
|
<colgroup>
|
|
|
|
<col class="vzebra-odd"/>
|
|
|
|
<col class="vzebra-even"/>
|
|
|
|
<col class="vzebra-odd"/>
|
|
|
|
<col class="vzebra-even"/>
|
|
|
|
<!-- <col class="vzebra-odd"/> -->
|
|
|
|
</colgroup>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2014-09-29 10:43:54 +08:00
|
|
|
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %>
|
|
|
|
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %>
|
2015-03-18 18:02:54 +08:00
|
|
|
<%= sort_header_tag('attach_type', :caption => l(:field_filecontenttype), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
|
|
|
|
<%= content_tag('th', l(:field_filetype), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
|
2014-09-29 10:43:54 +08:00
|
|
|
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %>
|
|
|
|
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %>
|
|
|
|
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>
|
2014-05-14 17:12:04 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2014-08-21 10:37:53 +08:00
|
|
|
<% if @curse_attachments != nil %>
|
|
|
|
<% @curse_attachments.each do |file| %>
|
2014-07-11 09:07:09 +08:00
|
|
|
<%if file.is_public == 0 && !User.current.member_of?(@project)%>
|
|
|
|
<%next%>
|
|
|
|
<%end%>
|
2014-05-14 17:12:04 +08:00
|
|
|
<tr class="file <%= cycle("odd", "odd") %>">
|
2014-10-21 16:38:16 +08:00
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filename" style="font-size: 13px; ">
|
|
|
|
<%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %>
|
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filesize">
|
|
|
|
<%= number_to_human_size(file.filesize) %>
|
|
|
|
</td>
|
2014-08-22 10:20:30 +08:00
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="attach_type">
|
2014-10-21 16:38:16 +08:00
|
|
|
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
<%= file.attachmentstype.typeName %>
|
|
|
|
</span>
|
2014-05-14 17:12:04 +08:00
|
|
|
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
|
2014-05-14 17:20:31 +08:00
|
|
|
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %>
|
2014-05-14 17:12:04 +08:00
|
|
|
</span>
|
|
|
|
</td>
|
2014-10-21 16:38:16 +08:00
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="content_type">
|
|
|
|
<%= file.show_suffix_type %>
|
|
|
|
</td>
|
2014-08-22 10:20:30 +08:00
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="field_file_dense">
|
2014-10-21 16:38:16 +08:00
|
|
|
<span id="field_file_dense_id_label<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
<%= file.file_dense_str %>
|
|
|
|
</span>
|
2014-07-11 09:07:09 +08:00
|
|
|
|
2014-10-21 16:38:16 +08:00
|
|
|
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
<%= render :partial => 'project_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list,
|
|
|
|
:attachment => file} %>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="downloads">
|
|
|
|
<%= file.downloads %>
|
2014-07-11 09:07:09 +08:00
|
|
|
</td>
|
2014-08-22 10:20:30 +08:00
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center">
|
2014-05-14 17:12:04 +08:00
|
|
|
<%= link_to(image_tag('delete.png'), attachment_path(file),
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
|
|
|
</td>
|
2014-05-21 11:03:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class='description' colspan="6">
|
2014-05-14 17:12:04 +08:00
|
|
|
<div class="tags_area">
|
|
|
|
<%# @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设Z | %>
|
|
|
|
<%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %>
|
|
|
|
<div class="tags_gradint"></div>
|
|
|
|
</div>
|
2014-10-21 16:38:16 +08:00
|
|
|
<div class="read-more hidden">
|
2015-03-18 18:02:54 +08:00
|
|
|
<a href="javascript:void(0);" onclick="readmore(this);"> <%= l(:button_more)%> </a>
|
2014-10-21 16:38:16 +08:00
|
|
|
</div>
|
2014-05-14 17:12:04 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-08-22 10:20:30 +08:00
|
|
|
</div>
|
2014-08-21 10:37:53 +08:00
|
|
|
<!--分页-->
|
|
|
|
<div class="pagination" style="float:left;">
|
|
|
|
<ul>
|
|
|
|
<%= pagination_links_full @feedback_pages %>
|
|
|
|
</ul>
|
|
|
|
</div>
|