Files
openfoodnetwork/app/views/admin/reports/_table.html.haml
Sebastian Castro d53d38906a Packing Report: Refactor view to be reusable by other reports
For now this view is used only in the context of packing, but later we would move all existing rpeort to use same view
2022-05-12 16:54:12 +02:00

18 lines
460 B
Plaintext

- if params[:q].present?
%table.report__table
%thead
%tr
- @report.table_headers.each do |heading|
%th
= t("admin.reports.table.headings.#{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)