课程、项目中资源切换资源类型时弹出error问题(原因:1.未新建分页对象(从某个类型切回全部),2.资源类型信息丢失)

competition
z9hang 11 years ago
parent 42285ce44d
commit 060759774b

@ -226,6 +226,7 @@ class FilesController < ApplicationController
elsif @course
@containers = [ Course.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@course.id)]
end
show_attachments @containers
@attachtype = params[:type].to_i
@contenttype = params[:contentType].to_s

@ -37,7 +37,7 @@
<!-- <td class="created_on"><%#= format_time(file.created_on) %></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.typeName %></span>
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:lable_unknow_type):file.attachmentstype.typeName %></span>
&nbsp;
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes,

@ -37,7 +37,7 @@
<!-- <td class="created_on"><%#= format_time(file.created_on) %></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.typeName %></span>
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:lable_unknow_type):file.attachmentstype.typeName %></span>
&nbsp;
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,

@ -1807,3 +1807,4 @@ en:
label_company_name: Company Name
notice_account_invalid_creditentials_new: You have not to the mailbox activation
lable_unknow_type: Unknow type

@ -2114,4 +2114,5 @@ zh:
lable_memos_max_length: 帖子内容最大长度为65535个字符
lable_forums_max_length: 贴吧描述最大长度为65535个字符
lable_unknow_type: 未知类型
Loading…
Cancel
Save