code layout clean up lib/redmine/export/pdf.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7816 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-11-16 03:58:02 +00:00
parent 36728d779d
commit b58d029294
1 changed files with 2 additions and 1 deletions

View File

@ -154,7 +154,8 @@ module Redmine
col_width = [] col_width = []
unless query.columns.empty? unless query.columns.empty?
col_width = query.columns.collect do |c| col_width = query.columns.collect do |c|
(c.name == :subject || (c.is_a?(QueryCustomFieldColumn) && ['string', 'text'].include?(c.custom_field.field_format)))? 4.0 : 1.0 (c.name == :subject || (c.is_a?(QueryCustomFieldColumn) &&
['string', 'text'].include?(c.custom_field.field_format))) ? 4.0 : 1.0
end end
ratio = (table_width - col_id_width) / col_width.inject(0) {|s,w| s += w} ratio = (table_width - col_id_width) / col_width.inject(0) {|s,w| s += w}
col_width = col_width.collect {|w| w * ratio} col_width = col_width.collect {|w| w * ratio}