From 8cfec7ddf5c0a44be5850dd31d3cea517a730616 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 11 Sep 2012 00:08:32 +0000 Subject: [PATCH] gantt: code layout cleanup pdf_subject method of lib/redmine/helpers/gantt.rb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10350 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/helpers/gantt.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index fa60a72eb..0e389f8fd 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -679,8 +679,10 @@ module Redmine params[:pdf].SetY(params[:top]) params[:pdf].SetX(15) char_limit = PDF::MaxCharactorsForSubject - params[:indent] - params[:pdf].RDMCell(params[:subject_width]-15, 5, (" " * params[:indent]) + subject.to_s.sub(/^(.{#{char_limit}}[^\s]*\s).*$/, '\1 (...)'), "LR") - + params[:pdf].RDMCell(params[:subject_width] - 15, 5, + (" " * params[:indent]) + + subject.to_s.sub(/^(.{#{char_limit}}[^\s]*\s).*$/, '\1 (...)'), + "LR") params[:pdf].SetY(params[:top]) params[:pdf].SetX(params[:subject_width]) params[:pdf].RDMCell(params[:g_width], 5, "", "LR")