]> source.dussan.org Git - redmine.git/commitdiff
Remove trailing whitespaces from lib/redmine/export/pdf/issues_pdf_helper.rb
authorGo MAEDA <maeda@farend.jp>
Sun, 17 Mar 2019 05:10:11 +0000 (05:10 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 17 Mar 2019 05:10:11 +0000 (05:10 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@17984 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf/issues_pdf_helper.rb

index 6185bff63d0a43601c4ee8cba2c44c851af0b9d0..6113064c1e5ef5502b87d47507f4a771863cf4e6 100644 (file)
@@ -45,21 +45,21 @@ module Redmine
           pdf.SetFontStyle('',8)
           pdf.RDMMultiCell(190, 5, "#{format_time(issue.created_on)} - #{issue.author}")
           pdf.ln
-  
+
           left = []
           left << [l(:field_status), issue.status]
           left << [l(:field_priority), issue.priority]
           left << [l(:field_assigned_to), issue.assigned_to] unless issue.disabled_core_fields.include?('assigned_to_id')
           left << [l(:field_category), issue.category] unless issue.disabled_core_fields.include?('category_id')
           left << [l(:field_fixed_version), issue.fixed_version] unless issue.disabled_core_fields.include?('fixed_version_id')
-  
+
           right = []
           right << [l(:field_start_date), format_date(issue.start_date)] unless issue.disabled_core_fields.include?('start_date')
           right << [l(:field_due_date), format_date(issue.due_date)] unless issue.disabled_core_fields.include?('due_date')
           right << [l(:field_done_ratio), "#{issue.done_ratio}%"] unless issue.disabled_core_fields.include?('done_ratio')
           right << [l(:field_estimated_hours), l_hours(issue.estimated_hours)] unless issue.disabled_core_fields.include?('estimated_hours')
           right << [l(:label_spent_time), l_hours(issue.total_spent_hours)] if User.current.allowed_to?(:view_time_entries, issue.project)
-  
+
           rows = left.size > right.size ? left.size : right.size
           while left.size < rows
             left << nil
@@ -73,7 +73,7 @@ module Redmine
           custom_field_values.each_with_index do |custom_value, i|
             (i < half ? left : right) << [custom_value.custom_field.name, show_value(custom_value, false)]
           end
-  
+
           if pdf.get_rtl
             border_first_top = 'RT'
             border_last_top  = 'LT'
@@ -85,7 +85,7 @@ module Redmine
             border_first = 'L'
             border_last  = 'R'
           end
-  
+
           rows = left.size > right.size ? left.size : right.size
           rows.times do |i|
             heights = []
@@ -100,26 +100,26 @@ module Redmine
             item = right[i]
             heights << pdf.get_string_height(60, item ? item.last.to_s  : "")
             height = heights.max
-  
+
             item = left[i]
             pdf.SetFontStyle('B',9)
             pdf.RDMMultiCell(35, height, item ? "#{item.first}:" : "", (i == 0 ? border_first_top : border_first), '', 0, 0)
             pdf.SetFontStyle('',9)
             pdf.RDMMultiCell(60, height, item ? item.last.to_s : "", (i == 0 ? border_last_top : border_last), '', 0, 0)
-  
+
             item = right[i]
             pdf.SetFontStyle('B',9)
             pdf.RDMMultiCell(35, height, item ? "#{item.first}:" : "",  (i == 0 ? border_first_top : border_first), '', 0, 0)
             pdf.SetFontStyle('',9)
             pdf.RDMMultiCell(60, height, item ? item.last.to_s : "", (i == 0 ? border_last_top : border_last), '', 0, 2)
-  
+
             pdf.set_x(base_x)
           end
-  
+
           pdf.SetFontStyle('B',9)
           pdf.RDMCell(35+155, 5, l(:field_description), "LRT", 1)
           pdf.SetFontStyle('',9)
-  
+
           # Set resize image scale
           pdf.set_image_scale(1.6)
           text = textilizable(issue, :description,
@@ -157,7 +157,7 @@ module Redmine
               pdf.ln
             end
           end
-  
+
           relations = issue.relations.select { |r| r.other_issue(issue).visible? }
           unless relations.empty?
             truncate_length = (!is_cjk? ? 80 : 60)
@@ -185,7 +185,7 @@ module Redmine
           end
           pdf.RDMCell(190,5, "", "T")
           pdf.ln
-  
+
           if issue.changesets.any? &&
                User.current.allowed_to?(:view_changesets, issue.project)
             pdf.SetFontStyle('B',9)
@@ -205,7 +205,7 @@ module Redmine
               pdf.ln
             end
           end
-  
+
           if assoc[:journals].present?
             pdf.SetFontStyle('B',9)
             pdf.RDMCell(190,5, l(:label_history), "B")
@@ -234,7 +234,7 @@ module Redmine
               pdf.ln
             end
           end
-  
+
           if issue.attachments.any?
             pdf.SetFontStyle('B',9)
             pdf.RDMCell(190,5, l(:label_attachment_plural), "B")
@@ -261,7 +261,7 @@ module Redmine
           pdf.footer_date = format_date(User.current.today)
           pdf.set_auto_page_break(false)
           pdf.add_page("L")
-  
+
           # Landscape A4 = 210 x 297 mm
           page_height   = pdf.get_page_height # 210
           page_width    = pdf.get_page_width  # 297
@@ -269,7 +269,7 @@ module Redmine
           right_margin  = pdf.get_original_margins['right'] # 10
           bottom_margin = pdf.get_footer_margin
           row_height    = 4
-  
+
           # column widths
           table_width = page_width - right_margin - left_margin
           col_width = []
@@ -277,13 +277,13 @@ module Redmine
             col_width = calc_col_width(issues, query, table_width, pdf)
             table_width = col_width.inject(0, :+)
           end
-  
+
           # use full width if the description or last_notes are displayed
           if table_width > 0 && (query.has_column?(:description) || query.has_column?(:last_notes))
             col_width = col_width.map {|w| w * (page_width - right_margin - left_margin) / table_width}
             table_width = col_width.inject(0, :+)
           end
-  
+
           # title
           pdf.SetFontStyle('B',11)
           pdf.RDMCell(190, 8, title)
@@ -317,10 +317,10 @@ module Redmine
               end
               previous_group = group
             end
-  
+
             # fetch row values
             col_values = fetch_row_values(issue, query, level)
-  
+
             # make new page if it doesn't fit on the current one
             base_y     = pdf.get_y
             max_height = get_issues_to_pdf_write_cells(pdf, col_values, col_width)
@@ -330,11 +330,11 @@ module Redmine
               render_table_header(pdf, query, col_width, row_height, table_width)
               base_y = pdf.get_y
             end
-  
+
             # write the cells on page
             issues_to_pdf_write_cells(pdf, col_values, col_width, max_height)
             pdf.set_y(base_y + max_height)
-  
+
             if query.has_column?(:description) && issue.description?
               pdf.set_x(10)
               pdf.set_auto_page_break(true, bottom_margin)
@@ -349,7 +349,7 @@ module Redmine
               pdf.set_auto_page_break(false)
           end
           end
-  
+
           if issues.size == Setting.issues_export_limit.to_i
             pdf.SetFontStyle('B',10)
             pdf.RDMCell(0, row_height, '...')