summaryrefslogtreecommitdiffstats
path: root/app/views/issues/gantt.rhtml
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-13 14:56:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-13 14:56:49 +0000
commit8e3d1b694ab47317638b474082cb70e08a8d02e7 (patch)
tree9997cc24910a029fea3e98ed0765566d9c4bb97e /app/views/issues/gantt.rhtml
parente109c9b6b6f314dea19bf92dffa217d962eaa200 (diff)
downloadredmine-8e3d1b694ab47317638b474082cb70e08a8d02e7.tar.gz
redmine-8e3d1b694ab47317638b474082cb70e08a8d02e7.zip
Adds subtasking (#443) including:
* priority, start/due dates, progress, estimate, spent time roll-up to parent issues * descendant issues tree displayed on the issue view with context menu support * issue tree display on the gantt chart * issue tree copy on project copy * unlimited nesting Defining subtasks requires the new permission 'Manage subtasks'. Subtasks can not belong to a different project than the parent task. Implementation is based on scoped nested sets for fast reads and updates. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3573 e93f8b46-1217-0410-a6f0-8f06a7374b81
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>