|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<% attachmenttypes = @project.attachmenttypes %>
|
|
|
|
|
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
|
<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
|
<table class="list files" id="ver-zebra">
|
|
|
|
|
<table class="list files" id="ver-zebra" style="table-layout: fixed;">
|
|
|
|
|
<colgroup>
|
|
|
|
|
<col class="vzebra-odd"/>
|
|
|
|
|
<col class="vzebra-even"/>
|
|
|
|
@ -13,15 +13,13 @@
|
|
|
|
|
</colgroup>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %>
|
|
|
|
|
<%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %>
|
|
|
|
|
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children") %>
|
|
|
|
|
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %>
|
|
|
|
|
<%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype") %>
|
|
|
|
|
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %>
|
|
|
|
|
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
|
|
|
|
|
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
|
|
|
|
|
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
|
|
|
|
|
<%= 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") %>
|
|
|
|
|
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
|
|
|
|
|
<%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
|
|
|
|
|
<%= 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") %>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
@ -33,28 +31,38 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if isTypeOk(file, selAttachType, selContentType) %>
|
|
|
|
|
<tr class="file <%= cycle("odd", "odd") %>">
|
|
|
|
|
<td 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 class="created_on"><%#= format_time(file.created_on) %></td> -->
|
|
|
|
|
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
|
|
|
|
|
<td 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 class="filesize">
|
|
|
|
|
<%= number_to_human_size(file.filesize) %>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="attach_type">
|
|
|
|
|
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:label_unknow_type):file.attachmentstype.typeName %></span>
|
|
|
|
|
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
|
<%= file.attachmentstype.nil? ? l(:label_unknow_type):file.attachmentstype.typeName %>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
|
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,
|
|
|
|
|
:attachment => file, :contentype => selContentType} %>
|
|
|
|
|
</span>
|
|
|
|
|
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
|
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,
|
|
|
|
|
:attachment => file, :contentype => selContentType} %>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="content_type">
|
|
|
|
|
<%= file.show_suffix_type %>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="content_type"><%= file.show_suffix_type %></td>
|
|
|
|
|
<td class="field_file_dense">
|
|
|
|
|
<span id="field_file_dense_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.file_dense_str %></span>
|
|
|
|
|
<span id="field_file_dense_id_label<%= file.id %>" style="white-space:nowrap;">
|
|
|
|
|
<%= file.file_dense_str %>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<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 class="downloads">
|
|
|
|
|
<%= file.downloads %>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="downloads"><%= file.downloads %></td>
|
|
|
|
|
<!-- <td class="digest" width="300px"><%= file.description %></td> -->
|
|
|
|
|
<td align="center">
|
|
|
|
|
<%= link_to(image_tag('delete.png'), attachment_path(file),
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
|
|
|
@ -67,7 +75,8 @@
|
|
|
|
|
<%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %>
|
|
|
|
|
<div class="tags_gradint"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="read-more hidden"><a href="javascript:void(0);" onclick="readmore(this);"> 更多 </a>
|
|
|
|
|
<div class="read-more hidden">
|
|
|
|
|
<a href="javascript:void(0);" onclick="readmore(this);"> 更多 </a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -75,9 +84,6 @@
|
|
|
|
|
<% end -%>
|
|
|
|
|
<% reset_cycle %>
|
|
|
|
|
<% end -%>
|
|
|
|
|
<!-- %= h downloadAll(@containers) % -->
|
|
|
|
|
<!-- %= link_to "download all file", (downloadAll(@containers)) % -->
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|