Module: Tasks::Import::Dwca::PsuImportHelper

Defined in:
app/helpers/tasks/import/dwca/psu_import_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) text_row(row)



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/helpers/tasks/import/dwca/psu_import_helper.rb', line 3

def text_row(row)
  color  = 'green'
  color  = 'red' unless row[:err].blank?
  output = "<li class=#{color}>"
  output += (row[:row].to_s)
  # output += ((ap row[:row]))
  # output += ((ap row[:row_objects][:make_ce]))
  # output += ap(row[:row_objects][:make_ce])
  unless row[:warn].blank?
    row[:warn].each do |warning|
      # unless warning.blank?
        output += (:ul, (:li, warning, class: 'brown'))
      # end
    end
  end
  unless row[:err].blank?
    row[:err].each do |error|
      # unless error.blank?
        output += (:ul, (:li, error, class: 'red'))
      # end
    end
  end
  output += '</li>'
  output.html_safe
end