Skip to content

Commit

Permalink
Disable project completion display on the gantt (#7127).
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4582 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
jplang committed Dec 29, 2010
1 parent f2ae2e9 commit ad62060
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/redmine/helpers/gantt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ def line_for_project(project, options)
options[:zoom] ||= 1
options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]

coords = coordinates(project.start_date, project.due_date, project.completed_percent(:include_subprojects => true), options[:zoom])
label = "#{h project } #{h project.completed_percent(:include_subprojects => true).to_i.to_s}%"
coords = coordinates(project.start_date, project.due_date, nil, options[:zoom])
label = h(project)

case options[:format]
when :html
Expand Down
10 changes: 5 additions & 5 deletions test/unit/lib/redmine/helpers/gantt_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,24 +353,24 @@ def create_gantt(project=Project.generate!, options={})
end

context "late line" do
should "start from the starting point on the left" do
should_eventually "start from the starting point on the left" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_late[style*=left:28px]", true, @response.body
end

should "be the total delayed width of the project" do
should_eventually "be the total delayed width of the project" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_late[style*=width:30px]", true, @response.body
end
end

context "done line" do
should "start from the starting point on the left" do
should_eventually "start from the starting point on the left" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_done[style*=left:28px]", true, @response.body
end

should "Be the total done width of the project" do
should_eventually "Be the total done width of the project" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_done[style*=width:18px]", true, @response.body
end
Expand Down Expand Up @@ -420,7 +420,7 @@ def create_gantt(project=Project.generate!, options={})
assert_select "div.project.label", /#{@project.name}/
end

should "show the percent complete" do
should_eventually "show the percent complete" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.label", /0%/
end
Expand Down

0 comments on commit ad62060

Please sign in to comment.