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