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

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

Overview

TODO: remove fully

Instance Method Summary collapse

Instance Method Details

#text_row(row) ⇒ Object



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

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]))
  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