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)
unless row[:warn].blank?
row[:warn].each do |warning|
output += content_tag(:ul, content_tag(:li, warning, class: 'brown'))
end
end
unless row[:err].blank?
row[:err].each do |error|
output += content_tag(:ul, content_tag(:li, error, class: 'red'))
end
end
output += '</li>'
output.html_safe
end
|