Use the same template even if there is no sub_report

This commit is contained in:
Jean-Baptiste Bellet
2022-10-25 15:27:43 +02:00
parent 3489f08ec5
commit e16c8661a2

View File

@@ -14,9 +14,7 @@
= I18n.t(:name, scope: [:admin, :reports, report_type])
%td
- if report_subtypes.empty?
%ul{style: "margin-left: 12pt"}
%li
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
- url = main_app.admin_report_url(report_type: report_type)
= link_to name, url
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
- url = main_app.admin_report_url(report_type: report_type)
- report_subtypes = [[name, url]]
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }