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
This commit is contained in:
Toshi MARUYAMA 2012-09-11 00:08:32 +00:00
parent af177c3a59
commit 8cfec7ddf5
1 changed files with 4 additions and 2 deletions

View File

@ -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")