comparison lib/redmine/helpers/.svn/text-base/gantt.rb.svn-base @ 37:94944d00e43c

* Update to SVN trunk rev 4411
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 19 Nov 2010 13:24:41 +0000
parents 40f7cfd4df19
children af80e5618e9b
comparison
equal deleted inserted replaced
22:40f7cfd4df19 37:94944d00e43c
281 options[:pdf].Cell(options[:g_width], 5, "", "LR") 281 options[:pdf].Cell(options[:g_width], 5, "", "LR")
282 end 282 end
283 end 283 end
284 284
285 def line_for_project(project, options) 285 def line_for_project(project, options)
286 # Skip versions that don't have a start_date 286 # Skip versions that don't have a start_date or due date
287 if project.is_a?(Project) && project.start_date 287 if project.is_a?(Project) && project.start_date && project.due_date
288 options[:zoom] ||= 1 288 options[:zoom] ||= 1
289 options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom] 289 options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
290 290
291 291
292 case options[:format] 292 case options[:format]
417 end 417 end
418 end 418 end
419 419
420 def line_for_version(version, options) 420 def line_for_version(version, options)
421 # Skip versions that don't have a start_date 421 # Skip versions that don't have a start_date
422 if version.is_a?(Version) && version.start_date 422 if version.is_a?(Version) && version.start_date && version.due_date
423 options[:zoom] ||= 1 423 options[:zoom] ||= 1
424 options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom] 424 options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
425 425
426 case options[:format] 426 case options[:format]
427 when :html 427 when :html
534 assigned_string = l(:field_assigned_to) + ": " + issue.assigned_to.name 534 assigned_string = l(:field_assigned_to) + ": " + issue.assigned_to.name
535 output << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string) 535 output << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string)
536 end 536 end
537 output << "<span class='#{css_classes.join(' ')}'>" 537 output << "<span class='#{css_classes.join(' ')}'>"
538 output << view.link_to_issue(issue) 538 output << view.link_to_issue(issue)
539 output << ":"
540 output << h(issue.subject)
541 output << '</span>' 539 output << '</span>'
542 else 540 else
543 ActiveRecord::Base.logger.debug "Gantt#subject_for_issue was not given an issue" 541 ActiveRecord::Base.logger.debug "Gantt#subject_for_issue was not given an issue"
544 '' 542 ''
545 end 543 end