diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-26 09:12:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-26 09:12:13 +0000 |
commit | 1a90fbee8b5f8c51968fe20480a32257294b878a (patch) | |
tree | 3bfd363d0066082ed4e692dff78af03f7f0a6a4e /app | |
parent | 2ac30707d2e3203ccdb8326f9babe2c5f35ee951 (diff) | |
download | redmine-1a90fbee8b5f8c51968fe20480a32257294b878a.tar.gz redmine-1a90fbee8b5f8c51968fe20480a32257294b878a.zip |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/gantt.rfpdf | 4 | ||||
-rw-r--r-- | 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| %>
<div style="position: absolute;line-height:1em;height:16px;top:<%= top %>px;left:4px;width:<%= subject_width - 5 %>px;overflow:hidden;">
- <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>:
+ <small><%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>:
<%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
</div>
<% 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
%>
<div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="m_bg">
- <small><%= week_f.cweek %></small>
+ <small><%= week_f.cweek if width >= 16 %></small>
</div>
<%
left = left + width+1
|