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
This commit is contained in:
parent
2ac30707d2
commit
1a90fbee8b
|
@ -66,11 +66,11 @@ if show_weeks
|
||||||
pdf.Cell(width + 1, height, "", "LTR")
|
pdf.Cell(width + 1, height, "", "LTR")
|
||||||
left = left + width+1
|
left = left + width+1
|
||||||
end
|
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
|
width = (week_f + 6 <= @date_to) ? 7 * zoom : (@date_to - week_f + 1) * zoom
|
||||||
pdf.SetY(y_start + header_heigth)
|
pdf.SetY(y_start + header_heigth)
|
||||||
pdf.SetX(left)
|
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
|
left = left + width
|
||||||
week_f = week_f+7
|
week_f = week_f+7
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
border-bottom: 1px solid #c0c0c0;
|
border-bottom: 1px solid #c0c0c0;
|
||||||
border-right: 1px solid #c0c0c0;
|
border-right: 1px solid #c0c0c0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.task {
|
.task {
|
||||||
|
@ -102,7 +103,7 @@ t_height = g_height + headers_heigth
|
||||||
top = headers_heigth + 8
|
top = headers_heigth + 8
|
||||||
@issues.each do |i| %>
|
@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;">
|
<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>
|
<%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
|
||||||
</div>
|
</div>
|
||||||
<% top = top + 20
|
<% top = top + 20
|
||||||
|
@ -151,11 +152,11 @@ if show_weeks
|
||||||
left = left + width+1
|
left = left + width+1
|
||||||
end %>
|
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
|
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">
|
<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>
|
</div>
|
||||||
<%
|
<%
|
||||||
left = left + width+1
|
left = left + width+1
|
||||||
|
|
Loading…
Reference in New Issue