|
|
@ -233,6 +233,8 @@ class AttachmentsController < ApplicationController
|
|
|
|
format.html { redirect_to_referer_or softapplications_path(@attachment.container) }
|
|
|
|
format.html { redirect_to_referer_or softapplications_path(@attachment.container) }
|
|
|
|
elsif !@attachment.container.nil? && @attachment.container.is_a?(Bid)
|
|
|
|
elsif !@attachment.container.nil? && @attachment.container.is_a?(Bid)
|
|
|
|
format.html { redirect_to_referer_or respond_path(@attachment.container) }
|
|
|
|
format.html { redirect_to_referer_or respond_path(@attachment.container) }
|
|
|
|
|
|
|
|
elsif !@attachment.container.nil? && @attachment.container.is_a?(PhoneAppVersion)
|
|
|
|
|
|
|
|
format.html { redirect_to_referer_or mobile_version_path }
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if @project.nil?
|
|
|
|
if @project.nil?
|
|
|
|
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
|
|
|
|
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
|
|
|
@ -417,7 +419,7 @@ private
|
|
|
|
@attachment.container.board.course)
|
|
|
|
@attachment.container.board.course)
|
|
|
|
@course = @attachment.container.board.course
|
|
|
|
@course = @attachment.container.board.course
|
|
|
|
else
|
|
|
|
else
|
|
|
|
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication'
|
|
|
|
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion'
|
|
|
|
@project = @attachment.project
|
|
|
|
@project = @attachment.project
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|