Feature #6276 » gantt.rb-1day-coloring.patch
lib/redmine/helpers/gantt.rb (working copy) | ||
---|---|---|
642 | 739 |
end |
643 | 740 |
|
644 | 741 |
if progress |
645 |
progress_date = start_date + (end_date - start_date) * (progress / 100.0) |
|
742 |
progress_date = start_date + (end_date - start_date + 1) * (progress / 100.0)
|
|
646 | 743 |
if progress_date > self.date_from && progress_date > start_date |
647 | 744 |
if progress_date < self.date_to |
648 |
coords[:bar_progress_end] = progress_date - self.date_from + 1
|
|
745 |
coords[:bar_progress_end] = progress_date - self.date_from |
|
649 | 746 |
else |
650 | 747 |
coords[:bar_progress_end] = self.date_to - self.date_from + 1 |
651 | 748 |
end |
652 | 749 |
end |
653 | 750 |
|
654 | 751 |
if progress_date < Date.today |
655 |
late_date = [Date.today, end_date].min
|
|
752 |
late_date = [Date.today, (end_date + 1)].min
|
|
656 | 753 |
if late_date > self.date_from && late_date > start_date |
657 | 754 |
if late_date < self.date_to |
658 |
coords[:bar_late_end] = late_date - self.date_from + 1
|
|
755 |
coords[:bar_late_end] = late_date - self.date_from |
|
659 | 756 |
else |
660 | 757 |
coords[:bar_late_end] = self.date_to - self.date_from + 1 |
661 | 758 |
end |
- « Previous
- 1
- 2
- Next »