summaryrefslogtreecommitdiffstats
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-18 10:17:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-18 10:17:59 +0000
commitdb3e8616c89ba34196fd12eafb3680df9479a024 (patch)
treeb7d0ca11af7c9ec464357c9e5193a8250f1d96eb /app/controllers/projects_controller.rb
parent8fdef1f82098258e2d5dda840ce5f4a921726f51 (diff)
downloadredmine-db3e8616c89ba34196fd12eafb3680df9479a024.tar.gz
redmine-db3e8616c89ba34196fd12eafb3680df9479a024.zip
better rendering time for projects/calendar
git-svn-id: http://redmine.rubyforge.org/svn/trunk@343 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index f02a0e1e6..8feb5f5de 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -519,7 +519,12 @@ class ProjectsController < ApplicationController
# finish on sunday
@date_to = @date_to + (7-@date_to.cwday)
- @issues = @project.issues.find(:all, :include => [:tracker, :status, :assigned_to, :priority], :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to])
+ @issues = @project.issues.find(:all, :include => [:tracker, :status, :assigned_to, :priority],
+ :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to])
+
+ @ending_issues_by_days = @issues.group_by {|issue| issue.due_date}
+ @starting_issues_by_days = @issues.group_by {|issue| issue.start_date}
+
render :layout => false if request.xhr?
end