summaryrefslogtreecommitdiffstats
path: root/app/views/issues/gantt.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/issues/gantt.rhtml')
-rw-r--r--app/views/issues/gantt.rhtml15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/views/issues/gantt.rhtml b/app/views/issues/gantt.rhtml
index 8d6677d9c..f0c6f4622 100644
--- a/app/views/issues/gantt.rhtml
+++ b/app/views/issues/gantt.rhtml
@@ -79,8 +79,10 @@ t_height = g_height + headers_height
# Tasks subjects
#
top = headers_height + 8
-@gantt.events.each do |i| %>
- <div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small>
+@gantt.events.each do |i|
+left = 4 + (i.is_a?(Issue) ? i.level * 16 : 0)
+ %>
+ <div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:<%= left %>px;overflow:hidden;"><small>
<% if i.is_a? Issue %>
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_issue i %>
@@ -189,15 +191,16 @@ top = headers_height + 10
i_width = ((i_end_date - i_start_date + 1)*zoom).floor - 2 # total width of the issue (- 2 for left and right borders)
d_width = ((i_done_date - i_start_date)*zoom).floor - 2 # done width
l_width = i_late_date ? ((i_late_date - i_start_date+1)*zoom).floor - 2 : 0 # delay width
+ css = "task " + (i.leaf? ? 'leaf' : 'parent')
%>
- <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;" class="task task_todo">&nbsp;</div>
+ <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;" class="<%= css %> task_todo"><div class="left"></div>&nbsp;<div class="right"></div></div>
<% if l_width > 0 %>
- <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= l_width %>px;" class="task task_late">&nbsp;</div>
+ <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= l_width %>px;" class="<%= css %> task_late">&nbsp;</div>
<% end %>
<% if d_width > 0 %>
- <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= d_width %>px;" class="task task_done">&nbsp;</div>
+ <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= d_width %>px;" class="<%= css %> task_done">&nbsp;</div>
<% end %>
- <div style="top:<%= top %>px;left:<%= i_left + i_width + 5 %>px;background:#fff;" class="task">
+ <div style="top:<%= top %>px;left:<%= i_left + i_width + 8 %>px;background:#fff;" class="<%= css %>">
<%= i.status.name %>
<%= (i.done_ratio).to_i %>%
</div>