@@ -519,7 +519,12 class ProjectsController < ApplicationController | |||
|
519 | 519 | # finish on sunday |
|
520 | 520 | @date_to = @date_to + (7-@date_to.cwday) |
|
521 | 521 | |
|
522 |
@issues = @project.issues.find(:all, :include => [:tracker, :status, :assigned_to, :priority], |
|
|
522 | @issues = @project.issues.find(:all, :include => [:tracker, :status, :assigned_to, :priority], | |
|
523 | :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to]) | |
|
524 | ||
|
525 | @ending_issues_by_days = @issues.group_by {|issue| issue.due_date} | |
|
526 | @starting_issues_by_days = @issues.group_by {|issue| issue.start_date} | |
|
527 | ||
|
523 | 528 | render :layout => false if request.xhr? |
|
524 | 529 | end |
|
525 | 530 |
@@ -43,9 +43,7 while day <= @date_to | |||
|
43 | 43 | <% end %> |
|
44 | 44 | <td valign="top" class="<%= day.month==@month ? "even" : "odd" %>" style="width:14%; <%= Date.today == day ? 'background:#FDFED0;' : '' %>"> |
|
45 | 45 | <p class="textright"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> |
|
46 | <% day_issues = [] | |
|
47 | @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } | |
|
48 | day_issues.each do |i| %> | |
|
46 | <% ((@ending_issues_by_days[day] || []) + (@starting_issues_by_days[day] || [])).uniq.each do |i| %> | |
|
49 | 47 | <div class="tooltip"> |
|
50 | 48 | <%= if day == i.start_date and day == i.due_date |
|
51 | 49 | image_tag('arrow_bw.png') |
General Comments 0
You need to be logged in to leave comments.
Login now