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