#1381修复选择相关内容类型、文件类型后,资源列表表头显示异常的BUG

2.格式化页面代码
 3.项目资源列表也有相关问题,一并修复
This commit is contained in:
sw 2014-10-21 16:38:16 +08:00
parent 87788ab34c
commit c76439c515
9 changed files with 142 additions and 155 deletions

View File

@ -2,11 +2,11 @@
<% attachmenttypes = @course.attachmenttypes %> <% attachmenttypes = @course.attachmenttypes %>
<% sufixtypes = @course.contenttypes %> <% sufixtypes = @course.contenttypes %>
<span class="borad-title"><%= t(:label_user_course) %>资源共享区</span> <span class="borad-title">
<%= l(:label_coursefile_sharingarea) %>
</span>
<div class="content-title-top"> <div class="content-title-top">
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @course) %>
<div class="clearfix"></div> <div class="clearfix"></div>
<div id="file_buttons" class="nhidden"> <div id="file_buttons" class="nhidden">
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %> <%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>

View File

@ -9,57 +9,55 @@
<col class="vzebra-even"/> <col class="vzebra-even"/>
<col class="vzebra-odd"/> <col class="vzebra-odd"/>
<col class="vzebra-even"/> <col class="vzebra-even"/>
<!-- <col class="vzebra-odd"/> -->
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %> <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %>
<%#= 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",: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") %> <%= 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')%> <%= 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('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('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") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<%# @containers.each do |container| %>
<%# next if container.attachments.empty? -%>
<%# if container.is_a?(Version) -%>
<!--<tr>
<th colspan="5" align="left" style="line-height: 30px; font-size: 14px; ">
<%#= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package", :style => "color: #666666;") %>
</th>
</tr>-->
<%# end -%>
<% if @curse_attachments != nil %> <% if @curse_attachments != nil %>
<% @curse_attachments.each do |file| %> <% @curse_attachments.each do |file| %>
<%if file.is_public == 0 && !User.current.member_of_course?(@course)%> <%if file.is_public == 0 && !User.current.member_of_course?(@course)%>
<%next%> <%next%>
<%end%> <%end%>
<tr class="file <%= cycle("odd", "odd") %>"> <tr class="file <%= cycle("odd", "odd") %>">
<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="filename" style="font-size: 13px; ">
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> --> <%= 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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filesize"><%= number_to_human_size(file.filesize) %></td> </td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filesize">
<%= number_to_human_size(file.filesize) %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="attach_type"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="attach_type">
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.typeName unless file.attachmentstype.nil? %></span> <span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;">
<%= file.attachmentstype.typeName unless file.attachmentstype.nil? %>
</span>
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %> <%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %>
</span> </span>
</td> </td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="content_type"><%= file.show_suffix_type %></td> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="content_type">
<%= file.show_suffix_type %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="field_file_dense"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" 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>
&nbsp; &nbsp;
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'course_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list, <%= render :partial => 'course_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list,
:attachment => file} %> :attachment => file} %>
</span> </span>
</td> </td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="downloads"><%= file.downloads %></td> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="downloads">
<!-- <td class="digest" width="300px"><%= file.description %></td> --> <%= file.downloads %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center">
<%= link_to(image_tag('delete.png'), attachment_path(file), <%= link_to(image_tag('delete.png'), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
@ -77,13 +75,6 @@
</tr> </tr>
<% end -%> <% end -%>
<% end %> <% end %>
<%# reset_cycle %>
<%# end -%>
<!-- %= h downloadAll(@containers) % -->
<!-- %= link_to "download all file", (downloadAll(@containers)) % -->
</tbody> </tbody>
</table> </table>
<!--分页--> <!--分页-->

View File

@ -3,25 +3,22 @@
<% attachmenttypes = @course.attachmenttypes %> <% attachmenttypes = @course.attachmenttypes %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @course) %> <% delete_allowed = User.current.allowed_to?(:manage_files, @course) %>
<% edit_allowed = User.current.allowed_to?(:manage_files, @course) %> <% edit_allowed = User.current.allowed_to?(:manage_files, @course) %>
<table class="list files" id="ver-zebra"> <table class="list files" id="ver-zebra" style="table-layout: fixed;">
<colgroup> <colgroup>
<col class="vzebra-odd"/> <col class="vzebra-odd"/>
<col class="vzebra-even"/> <col class="vzebra-even"/>
<col class="vzebra-odd"/> <col class="vzebra-odd"/>
<col class="vzebra-even"/> <col class="vzebra-even"/>
<!-- <col class="vzebra-odd"/> -->
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %> <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %>
<%#= 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",:class => "tableth") %>
<%= 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",:class => "tableth") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %> <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= 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",:class => "tableth") %>
<%= 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",:class => "tableth") %>
<%= 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",:class => "tableth") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -33,28 +30,36 @@
<% end %> <% end %>
<% if isTypeOk(file, selAttachType, selContentType) %> <% if isTypeOk(file, selAttachType, selContentType) %>
<tr class="file <%= cycle("odd", "odd") %>"> <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="filename" style="font-size: 13px; ">
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> --> <%= 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="filesize"><%= number_to_human_size(file.filesize) %></td>
<td class="attach_type"> <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>
&nbsp; &nbsp;
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes, <%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes,
:attachment => file, :contentype => selContentType} %> :attachment => file, :contentype => selContentType} %>
</span> </span>
</td> </td>
<td class="content_type"><%= file.show_suffix_type %></td> <td class="content_type">
<%= file.show_suffix_type %>
</td>
<td class="field_file_dense"> <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>
&nbsp; &nbsp;
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'course_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list, <%= render :partial => 'course_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list,
:attachment => file} %> :attachment => file} %>
</span> </span>
</td> </td>
<td class="downloads"><%= file.downloads %></td> <td class="downloads">
<!-- <td class="digest" width="300px"><%= file.description %></td> --> <%= file.downloads %>
</td>
<td align="center"> <td align="center">
<%= link_to(image_tag('delete.png'), attachment_path(file), <%= link_to(image_tag('delete.png'), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
@ -75,9 +80,6 @@
<% end -%> <% end -%>
<% reset_cycle %> <% reset_cycle %>
<% end -%> <% end -%>
<!-- %= h downloadAll(@containers) % -->
<!-- %= link_to "download all file", (downloadAll(@containers)) % -->
</tbody> </tbody>
</table> </table>

View File

@ -15,52 +15,51 @@
<thead> <thead>
<tr> <tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %> <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %>
<%#= 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",: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") %> <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %> <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %>
<%= 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('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('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") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<%# @containers.each do |container| %>
<%# next if container.attachments.empty? -%>
<%# if container.is_a?(Version) -%>
<!--tr>
<th colspan="5" align="left" style="line-height: 30px; font-size: 14px; ">
<%#= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package", :style => "color: #666666;") %>
</th>
</tr-->
<%# end -%>
<% if @curse_attachments != nil %> <% if @curse_attachments != nil %>
<% @curse_attachments.each do |file| %> <% @curse_attachments.each do |file| %>
<%if file.is_public == 0 && !User.current.member_of?(@project)%> <%if file.is_public == 0 && !User.current.member_of?(@project)%>
<%next%> <%next%>
<%end%> <%end%>
<tr class="file <%= cycle("odd", "odd") %>"> <tr class="file <%= cycle("odd", "odd") %>">
<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="filename" style="font-size: 13px; ">
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> --> <%= 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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filesize"><%= number_to_human_size(file.filesize) %></td> </td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filesize">
<%= number_to_human_size(file.filesize) %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="attach_type"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="attach_type">
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.typeName %></span> <span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;">
<%= file.attachmentstype.typeName %>
</span>
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %> <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %>
</span> </span>
</td> </td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="content_type"><%= file.show_suffix_type %></td> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="content_type">
<%= file.show_suffix_type %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="field_file_dense"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" 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>
&nbsp; &nbsp;
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;"> <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, <%= render :partial => 'project_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list,
:attachment => file} %> :attachment => file} %>
</span> </span>
</td> </td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="downloads"><%= file.downloads %></td> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="downloads">
<!-- <td class="digest" width="300px"><%= file.description %></td> --> <%= file.downloads %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center">
<%= link_to(image_tag('delete.png'), attachment_path(file), <%= link_to(image_tag('delete.png'), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
@ -73,15 +72,13 @@
<%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %> <%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %>
<div class="tags_gradint"></div> <div class="tags_gradint"></div>
</div> </div>
<div class="read-more hidden"><a href="javascript:void(0);" onclick="readmore(this);"> 更多 </a></div> <div class="read-more hidden">
<a href="javascript:void(0);" onclick="readmore(this);"> 更多 </a>
</div>
</td> </td>
</tr> </tr>
<% end -%> <% end -%>
<%# reset_cycle %>
<% end -%> <% end -%>
<!-- %= h downloadAll(@containers) % -->
<!-- %= link_to "download all file", (downloadAll(@containers)) % -->
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -3,7 +3,7 @@
<% attachmenttypes = @project.attachmenttypes %> <% attachmenttypes = @project.attachmenttypes %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
<% edit_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> <colgroup>
<col class="vzebra-odd"/> <col class="vzebra-odd"/>
<col class="vzebra-even"/> <col class="vzebra-even"/>
@ -13,15 +13,13 @@
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %> <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %>
<%#= 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",:class => "tableth") %>
<%= 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",:class => "tableth") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %> <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= 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",:class => "tableth") %>
<%= 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",:class => "tableth") %>
<%= 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",:class => "tableth") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -33,28 +31,38 @@
<% end %> <% end %>
<% if isTypeOk(file, selAttachType, selContentType) %> <% if isTypeOk(file, selAttachType, selContentType) %>
<tr class="file <%= cycle("odd", "odd") %>"> <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="filename" style="font-size: 13px; ">
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> --> <%= 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 class="filesize"><%= number_to_human_size(file.filesize) %></td> </td>
<td class="filesize">
<%= number_to_human_size(file.filesize) %>
</td>
<td class="attach_type"> <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>
&nbsp; &nbsp;
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,
:attachment => file, :contentype => selContentType} %> :attachment => file, :contentype => selContentType} %>
</span> </span>
</td> </td>
<td class="content_type"><%= file.show_suffix_type %></td> <td class="content_type">
<%= file.show_suffix_type %>
</td>
<td class="field_file_dense"> <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>
&nbsp; &nbsp;
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;"> <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, <%= render :partial => 'project_file_dense_edit', :locals => {:file_dense_list => file.file_dense_list,
:attachment => file} %> :attachment => file} %>
</span> </span>
</td> </td>
<td class="downloads"><%= file.downloads %></td> <td class="downloads">
<!-- <td class="digest" width="300px"><%= file.description %></td> --> <%= file.downloads %>
</td>
<td align="center"> <td align="center">
<%= link_to(image_tag('delete.png'), attachment_path(file), <%= link_to(image_tag('delete.png'), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> :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"} %> <%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %>
<div class="tags_gradint"></div> <div class="tags_gradint"></div>
</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> </div>
</td> </td>
</tr> </tr>
@ -75,9 +84,6 @@
<% end -%> <% end -%>
<% reset_cycle %> <% reset_cycle %>
<% end -%> <% end -%>
<!-- %= h downloadAll(@containers) % -->
<!-- %= link_to "download all file", (downloadAll(@containers)) % -->
</tbody> </tbody>
</table> </table>

View File

@ -121,7 +121,6 @@
function course_attachment_contenttypes_searchex(value) { function course_attachment_contenttypes_searchex(value) {
<% if @course%> <% if @course%>
$.ajax({ $.ajax({
url: '<%=getattachtype_course_files_path(course_id: @course)%>', url: '<%=getattachtype_course_files_path(course_id: @course)%>',
type: "POST", type: "POST",
data: { data: {

View File

@ -1,12 +1,3 @@
<%= error_messages_for 'bid' %> <%= error_messages_for 'bid' %>
<!--[form:project]-->
<!-- % unless @memo.parent_id %>
<%# if @memo.safe_attribute? 'sticky' %>
<%#= f.check_box :sticky %> <lable><%= l(:label_board_sticky) %></lable>
<%# end %>
<%# if @memo.safe_attribute? 'locked' %>
<%#= f.check_box :locked %> <%#= label_tag 'memo_locked', l(:label_board_locked) %>
<%# end %>
<%# end %> -->
<p><%= f.text_field :content, :required => true, :size => 60, :style => "width:150px;" %></p> <p><%= f.text_field :content, :required => true, :size => 60, :style => "width:150px;" %></p>
<p><%= hidden_field_tag 'subject', ||=@memo.subject %> <p><%= hidden_field_tag 'subject', ||=@memo.subject %>

View File

@ -2163,3 +2163,4 @@ zh:
lable_teacher_evaluation: 作业综评 lable_teacher_evaluation: 作业综评
lable_course_teacher: 主讲老师 lable_course_teacher: 主讲老师
lable_course_end: 课程学期已结束 lable_course_end: 课程学期已结束
lable_file_sharingarea: 资源共享区