From e16c8661a2bcbcfe8a02f1a58fd732084ef9d709 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 25 Oct 2022 15:27:43 +0200 Subject: [PATCH] Use the same template even if there is no sub_report --- app/views/admin/reports/index.html.haml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index 04bb24c088..9f898717c7 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -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 }