Index: app/views/gantts/show.html.erb =================================================================== --- app/views/gantts/show.html.erb (revision 4786) +++ app/views/gantts/show.html.erb (working copy) @@ -60,7 +60,7 @@ # Width of the entire chart g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom -@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width) +@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max t_height = g_height + headers_height Index: lib/redmine/helpers/gantt.rb =================================================================== --- lib/redmine/helpers/gantt.rb (revision 4786) +++ lib/redmine/helpers/gantt.rb (working copy) @@ -263,7 +263,11 @@ def subject_for_project(project, options) case options[:format] when :html - subject = "" + text_style = "width:#{options[:subject_width]-options[:indent]-20}px;" if options[:subject_width] + + subject = "' subject << view.link_to_project(project) subject << '' html_subject(options, subject, :css => "project-name") @@ -301,7 +305,11 @@ def subject_for_version(version, options) case options[:format] when :html - subject = "" + text_style = "width:#{options[:subject_width]-options[:indent]-20}px;" if options[:subject_width] + + subject = "' subject << view.link_to_version(version) subject << '' html_subject(options, subject, :css => "version-name") @@ -345,19 +353,29 @@ output = case options[:format] when :html - css_classes = '' + + css_classes = 'gantt_subject-text' css_classes << ' issue-overdue' if issue.overdue? css_classes << ' issue-behind-schedule' if issue.behind_schedule? - css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to - - subject = "" - if issue.assigned_to.present? + + if Setting.gravatar_enabled? && issue.assigned_to.present? assigned_string = l(:field_assigned_to) + ": " + issue.assigned_to.name - subject << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string) + subject = view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string) + text_style = 'left:20px;' + else + css_classes << ' icon icon-issue' + subject = '' + text_style = '' end + + text_style += "width:#{options[:subject_width]-options[:indent]-20}px;" if options[:subject_width] + + subject << "' subject << view.link_to_issue(issue) subject << '' - html_subject(options, subject, :css => "issue-subject") + "\n" + html_subject(options, subject, :css => 'issue-subject') + "\n" when :image image_subject(options, issue.subject) when :pdf @@ -369,7 +387,7 @@ @issue_ancestors << issue options[:indent] += options[:indent_increment] end - + output end @@ -709,7 +727,7 @@ end def html_subject(params, subject, options={}) - output = "
" + output = "
" output << subject output << "
" @subjects << output Index: public/stylesheets/application.css =================================================================== --- public/stylesheets/application.css (revision 4786) +++ public/stylesheets/application.css (working copy) @@ -783,6 +783,8 @@ } .gantt_subjects { font-size: 0.8em; } +.gantt_subject { position: absolute; height: 16px; line-height: 1.2em; } +.gantt_subject-text { position: absolute; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .task { position: absolute; @@ -924,7 +926,6 @@ /* Used on 12px Gravatar img tags without the icon background */ .icon-gravatar { - float: left; margin-right: 4px; }