##// END OF EJS Templates
code layout clean up lib/redmine/export/pdf.rb...
Toshi MARUYAMA -
r7696:b58d029294f7
parent child
Show More
@@ -154,7 +154,8 module Redmine
154 col_width = []
154 col_width = []
155 unless query.columns.empty?
155 unless query.columns.empty?
156 col_width = query.columns.collect do |c|
156 col_width = query.columns.collect do |c|
157 (c.name == :subject || (c.is_a?(QueryCustomFieldColumn) && ['string', 'text'].include?(c.custom_field.field_format)))? 4.0 : 1.0
157 (c.name == :subject || (c.is_a?(QueryCustomFieldColumn) &&
158 ['string', 'text'].include?(c.custom_field.field_format))) ? 4.0 : 1.0
158 end
159 end
159 ratio = (table_width - col_id_width) / col_width.inject(0) {|s,w| s += w}
160 ratio = (table_width - col_id_width) / col_width.inject(0) {|s,w| s += w}
160 col_width = col_width.collect {|w| w * ratio}
161 col_width = col_width.collect {|w| w * ratio}
General Comments 0
You need to be logged in to leave comments. Login now