Files
openfoodnetwork/app/views/admin/reports/index.html.haml
Maikel Linke 9f9d8020c1 Fix URL generation for report without subtype
The URL is generated in the partial and it just needs to know that
there's no subtype.
2022-10-26 11:53:25 +11:00

20 lines
616 B
Plaintext

- content_for :page_title do
= t(:listing_reports)
.columns.twelve
%table.index
%thead
%tr
%th= t(:name)
%th= t(:description)
%tbody
- @reports.each do |report_type, report_subtypes|
%tr
%td
= I18n.t(:name, scope: [:admin, :reports, report_type])
%td
- if report_subtypes.empty?
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
- report_subtypes = [[name, nil]]
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }