mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Remove the report Subtype selector in the Rendering Options section
+ add all sub-reports in the index page all of this is behind a feature toggle
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
- if @report_subtypes.present? && @report_subtypes.count > 1
|
||||
.row
|
||||
.alpha.two.columns= label_tag nil, t(:report_type)
|
||||
.omega.fourteen.columns
|
||||
= select_tag(:report_subtype, options_for_select(@report_subtypes, @report_subtype))
|
||||
- if feature?(:report_inverse_columns_logic, spree_current_user)
|
||||
%input{type: 'hidden', name: 'report_subtype', value: @report_subtype}
|
||||
- else
|
||||
.row
|
||||
.alpha.two.columns= label_tag nil, t(:report_type)
|
||||
.omega.fourteen.columns
|
||||
= select_tag(:report_subtype, options_for_select(@report_subtypes, @report_subtype))
|
||||
|
||||
|
||||
- if @report.header_option? || @report.summary_row_option?
|
||||
.row
|
||||
|
||||
5
app/views/admin/reports/_report_subtype.html.haml
Normal file
5
app/views/admin/reports/_report_subtype.html.haml
Normal file
@@ -0,0 +1,5 @@
|
||||
%ul{style: "margin-left: 12pt"}
|
||||
- report_subtypes.each do |report_subtype|
|
||||
%li
|
||||
- url = main_app.admin_report_url(report_type: report_type, report_subtype: report_subtype[1])
|
||||
= link_to report_subtype[0], url
|
||||
@@ -17,9 +17,7 @@
|
||||
%td
|
||||
- begin
|
||||
= I18n.t!(:description, scope: [:admin, :reports, report_type])
|
||||
- if feature? :report_inverse_columns_logic, spree_current_user
|
||||
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
|
||||
- rescue I18n::MissingTranslationData
|
||||
%ul{style: "margin-left: 12pt"}
|
||||
- report_subtypes.each do |report_subtype|
|
||||
%li
|
||||
- url = main_app.admin_report_url(report_type: report_type, report_subtype: report_subtype[1])
|
||||
= link_to report_subtype[0], url
|
||||
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
|
||||
|
||||
Reference in New Issue
Block a user