From 1a90fbee8b5f8c51968fe20480a32257294b878a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 26 Dec 2006 09:12:13 +0000 Subject: [PATCH] fixed a bug in gantt display when last day is a monday git-svn-id: http://redmine.rubyforge.org/svn/trunk@114 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/gantt.rfpdf | 4 ++-- app/views/projects/gantt.rhtml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/projects/gantt.rfpdf b/app/views/projects/gantt.rfpdf index 545abb483..8b8afb85d 100644 --- a/app/views/projects/gantt.rfpdf +++ b/app/views/projects/gantt.rfpdf @@ -66,11 +66,11 @@ if show_weeks pdf.Cell(width + 1, height, "", "LTR") left = left + width+1 end - while week_f < @date_to + while week_f <= @date_to width = (week_f + 6 <= @date_to) ? 7 * zoom : (@date_to - week_f + 1) * zoom pdf.SetY(y_start + header_heigth) pdf.SetX(left) - pdf.Cell(width, height, week_f.cweek.to_s, "LTR", 0, "C") + pdf.Cell(width, height, (width >= 5 ? week_f.cweek.to_s : ""), "LTR", 0, "C") left = left + width week_f = week_f+7 end diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml index 7fbe02757..0c6fc5d13 100644 --- a/app/views/projects/gantt.rhtml +++ b/app/views/projects/gantt.rhtml @@ -42,6 +42,7 @@ border-bottom: 1px solid #c0c0c0; border-right: 1px solid #c0c0c0; text-align: center; + overflow: hidden; } .task { @@ -102,7 +103,7 @@ t_height = g_height + headers_heigth top = headers_heigth + 8 @issues.each do |i| %>
- <%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: + <%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %>
<% top = top + 20 @@ -151,11 +152,11 @@ if show_weeks left = left + width+1 end %> <% - while week_f < @date_to + while week_f <= @date_to width = (week_f + 6 <= @date_to) ? 7 * zoom -1 : (@date_to - week_f + 1) * zoom-1 %>
- <%= week_f.cweek %> + <%= week_f.cweek if width >= 16 %>
<% left = left + width+1