mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
20 lines
492 B
Plaintext
20 lines
492 B
Plaintext
- column_partials ||= {}
|
|
%table.report__table
|
|
%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)
|