@project.issues.find(:all,:include=>[:author,:status],:conditions=>["issues.created_on<=? and issues.created_on>=?",@date_from+1,@date_to],:order=>"issues.created_on asc").each{|i|
@events_by_day[i.created_on.to_date]||=[]
@events_by_day[i.created_on.to_date]<<i
}
@show_issues=1
end
unlessparams[:show_news]=="0"
@project.news.find(:all,:conditions=>["news.created_on<=? and news.created_on>=?",@date_from+1,@date_to],:order=>"news.created_on asc").each{|i|
@events_by_day[i.created_on.to_date]||=[]
@events_by_day[i.created_on.to_date]<<i
}
@show_news=1
end
unlessparams[:show_files]=="0"
Attachment.find(:all,:joins=>"LEFT JOIN versions ON versions.id = attachments.container_id",:conditions=>["attachments.container_type='Version' and versions.project_id=? and attachments.created_on<=? and attachments.created_on>=?",@project.id,@date_from+1,@date_to],:order=>"attachments.created_on asc").each{|i|
@events_by_day[i.created_on.to_date]||=[]
@events_by_day[i.created_on.to_date]<<i
}
@show_files=1
end
unlessparams[:show_documentss]=="0"
Attachment.find(:all,:joins=>"LEFT JOIN documents ON documents.id = attachments.container_id",:conditions=>["attachments.container_type='Document' and documents.project_id=? and attachments.created_on<=? and attachments.created_on>=?",@project.id,@date_from+1,@date_to],:order=>"attachments.created_on asc").each{|i|