mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
24 lines
642 B
Plaintext
24 lines
642 B
Plaintext
- column_partials ||= {}
|
|
- if render_content?
|
|
%table.report__table{id: id}
|
|
%thead
|
|
%tr
|
|
- @header.each do |heading|
|
|
%th= heading
|
|
%tbody
|
|
- @table.each do |row|
|
|
%tr
|
|
- row.each_with_index do |cell_value, column_index|
|
|
%td
|
|
- partial = column_partials[column_index]
|
|
- if partial
|
|
= render partial, value: cell_value
|
|
- else
|
|
= cell_value
|
|
- if @table.empty?
|
|
%tr
|
|
%td{colspan: @header.count}= t(:none)
|
|
- else
|
|
%p.report__message
|
|
= t(".select_and_search", option: msg_option.upcase)
|