资源上传跳转问题

This commit is contained in:
huang 2016-03-03 17:25:52 +08:00
parent 5fd36c0e78
commit 8815e99db5
2 changed files with 11 additions and 14 deletions

View File

@ -2283,20 +2283,17 @@ class UsersController < ApplicationController
@save_message = attach_copied_obj.errors.full_messages @save_message = attach_copied_obj.errors.full_messages
end end
end end
if params[:mul_type] == "Course" respond_to do |format|
respond_to do |format| format.html {
redirect_to course_files_url(mul_container) if params[:mul_type] == "Course"
end redirect_to course_files_url(mul_container)
elsif params[:mul_type] == "Project" elsif params[:mul_type] == "Project"
respond_to do |format| redirect_to project_files_url(mul_container)
redirect_to project_files_url(mul_container) elsif params[:mul_type] == "SubfieldFile"
end redirect_to org_subfield_files_url(mul_container)
elsif params[:mul_type] == "SubfieldFile" end
respond_to do |format| }
redirect_to org_subfield_files_url(mul_container)
end
end end
end end
# 根据资源关键字进行搜索 # 根据资源关键字进行搜索

View File

@ -32,7 +32,7 @@
<%= form_tag( url_for({:controller => 'users', :action => 'import_into_container', <%= form_tag( url_for({:controller => 'users', :action => 'import_into_container',
:mul_id => params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id], :mul_id => params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id],
:mul_type => params[:project_id].nil? ? (params[:course_id].nil? ? "SubfieldFile" : "Course") : "Project"}), :mul_type => params[:project_id].nil? ? (params[:course_id].nil? ? "SubfieldFile" : "Course") : "Project"}),
:remote => true , :method => 'post', :id => 'resource_import_container_form') do %> :method => 'post', :id => 'resource_import_container_form') do %>
<% @attachments.each do |attach| %> <% @attachments.each do |attach| %>
<ul class="subjectRow"> <ul class="subjectRow">
<li class="subjectName fl hidden"> <li class="subjectName fl hidden">