|
|
|
@ -24,7 +24,8 @@ module StoresHelper
|
|
|
|
|
when 'Bid'
|
|
|
|
|
bid_path(container)
|
|
|
|
|
else
|
|
|
|
|
'#'#logger.error "StoresHelper#attachUrl unkown type ==> #{container}"
|
|
|
|
|
Rails.logger.error "ERROR: StoresHelper#attachUrl unkown type ==> #{container}"
|
|
|
|
|
'#'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -32,6 +33,8 @@ module StoresHelper
|
|
|
|
|
come_from_local(attachment).join(" > ").html_safe
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
WORD_LIMIT = 100
|
|
|
|
|
def come_from_local attachment
|
|
|
|
|
|
|
|
|
@ -93,8 +96,6 @@ module StoresHelper
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def project_link project
|
|
|
|
|
if project.nil?
|
|
|
|
|
Rails.logger.error "ERROR: attachment type unkown #project_link project.nil?"
|
|
|
|
@ -123,7 +124,7 @@ module StoresHelper
|
|
|
|
|
when 3 # 作业
|
|
|
|
|
if bid.courses.first.nil?
|
|
|
|
|
Rails.logger.error "ERROR: attachment type unkown #bid_link/when 3"
|
|
|
|
|
return [link_to(bid.id, '#')]
|
|
|
|
|
return [link_to('unkown', '#')]
|
|
|
|
|
end
|
|
|
|
|
bid_list = link_to l(:label_homework), project_homework_path(bid.courses.first)
|
|
|
|
|
bid_item = link_to bid.name, respond_path(bid)
|
|
|
|
|