Files
openfoodnetwork/app/views/admin/reports/_table.html.haml
2022-05-12 16:54:13 +02:00

20 lines
444 B
Plaintext

- report ||= @report
%table.report__table
%thead
%tr
- report.table_headers.each do |heading|
%th
= t("admin.reports.table.headings.#{heading}")
-# = heading
%tbody
- report.table_rows.each do |row|
- if row
%tr
- row.each do |cell|
%td
= cell
- if report.table_rows.empty?
%tr
%td{colspan: report.table_headers.count}= t(:none)