修改bug<测试版--项目版--作品下载:成功上传某些资源,正确选择内容类型,却并未正确显示相关内容类型的资源>

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-10-31 16:38:04 +08:00
parent bdc38014ac
commit 012db21b0d
2 changed files with 4 additions and 1 deletions

View File

@ -265,6 +265,7 @@ class FilesController < ApplicationController
'size' => "#{Attachment.table_name}.filesize", 'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads" 'downloads' => "#{Attachment.table_name}.downloads"
sort='' sort=''
if params[:sort] if params[:sort]
params[:sort].split(",").each do |sort_type| params[:sort].split(",").each do |sort_type|
order_by = sort_type.split(":") order_by = sort_type.split(":")

View File

@ -2,6 +2,7 @@
<% 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"><%= t(:label_user_course) %>资源共享区</span>
<div class="content-title-top"> <div class="content-title-top">
@ -49,7 +50,8 @@
<% if attachmenttypes.any? %> <% if attachmenttypes.any? %>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<label for="attachment_browse_label"><%= l(:attachment_browse) %></label> <label for="attachment_browse_label"><%= l(:attachment_browse) %></label>
<%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName"), <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0' ) +options_from_collection_for_select(attachmenttypes, "id", "typeName", params[:type]),
:onchange => "course_attachmenttypes_searchex(this.value)" %> :onchange => "course_attachmenttypes_searchex(this.value)" %>
<% end %> <% end %>
<% if sufixtypes.any? %> <% if sufixtypes.any? %>