|
@@
-175,7
+175,7
class ProjectsController < ApplicationController
|
|
175
|
|
|
175
|
|
|
176
|
# Show documents list of @project
|
|
176
|
# Show documents list of @project
|
|
177
|
def list_documents
|
|
177
|
def list_documents
|
|
178
|
@documents = @project.documents
|
|
178
|
@documents = @project.documents.find :all, :include => :category
|
|
179
|
end
|
|
179
|
end
|
|
180
|
|
|
180
|
|
|
181
|
# Add a new issue to @project
|
|
181
|
# Add a new issue to @project
|
|
@@
-398,7
+398,7
class ProjectsController < ApplicationController
|
|
398
|
end
|
|
398
|
end
|
|
399
|
|
|
399
|
|
|
400
|
unless params[:show_news] == "0"
|
|
400
|
unless params[:show_news] == "0"
|
|
401
|
@project.news.find(:all, :conditions => ["news.created_on>=? and news.created_on<=?", @date_from, @date_to] ).each { |i|
|
|
401
|
@project.news.find(:all, :conditions => ["news.created_on>=? and news.created_on<=?", @date_from, @date_to], :include => :author ).each { |i|
|
|
402
|
@events_by_day[i.created_on.to_date] ||= []
|
|
402
|
@events_by_day[i.created_on.to_date] ||= []
|
|
403
|
@events_by_day[i.created_on.to_date] << i
|
|
403
|
@events_by_day[i.created_on.to_date] << i
|
|
404
|
}
|
|
404
|
}
|
|
@@
-406,7
+406,7
class ProjectsController < ApplicationController
|
|
406
|
end
|
|
406
|
end
|
|
407
|
|
|
407
|
|
|
408
|
unless params[:show_files] == "0"
|
|
408
|
unless params[:show_files] == "0"
|
|
409
|
Attachment.find(:all, :select => "attachments.*", :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, @date_to] ).each { |i|
|
|
409
|
Attachment.find(:all, :select => "attachments.*", :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, @date_to], :include => :author ).each { |i|
|
|
410
|
@events_by_day[i.created_on.to_date] ||= []
|
|
410
|
@events_by_day[i.created_on.to_date] ||= []
|
|
411
|
@events_by_day[i.created_on.to_date] << i
|
|
411
|
@events_by_day[i.created_on.to_date] << i
|
|
412
|
}
|
|
412
|
}
|
|
@@
-418,7
+418,7
class ProjectsController < ApplicationController
|
|
418
|
@events_by_day[i.created_on.to_date] ||= []
|
|
418
|
@events_by_day[i.created_on.to_date] ||= []
|
|
419
|
@events_by_day[i.created_on.to_date] << i
|
|
419
|
@events_by_day[i.created_on.to_date] << i
|
|
420
|
}
|
|
420
|
}
|
|
421
|
Attachment.find(:all, :select => "attachments.*", :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, @date_to] ).each { |i|
|
|
421
|
Attachment.find(:all, :select => "attachments.*", :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, @date_to], :include => :author ).each { |i|
|
|
422
|
@events_by_day[i.created_on.to_date] ||= []
|
|
422
|
@events_by_day[i.created_on.to_date] ||= []
|
|
423
|
@events_by_day[i.created_on.to_date] << i
|
|
423
|
@events_by_day[i.created_on.to_date] << i
|
|
424
|
}
|
|
424
|
}
|