mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
I'm adding TurboPower for the scroll_into_view action. It adds all the nice CableReady actions to Turbo Streams. Note that I omitted `block: "start"` because that option is the default in Javascript. And the generic `action` method doesn't support parameters like this anyway. I'll work on that in the next commit. I also re-introduced a race condition by rendering the "loading" indicator after triggering the report rendering job. I'm planning to resolve that later.
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
- content_for :page_title do
|
|
= @report_title
|
|
|
|
- content_for :minimal_js, true
|
|
|
|
= form_for @report.search, { url: url_for, data: { turbo: "true" } } do |f|
|
|
= hidden_field_tag "uuid", request.uuid
|
|
|
|
%fieldset.no-border-bottom.print-hidden
|
|
%legend{ align: 'center'}= t(:report_filters)
|
|
= render partial: "admin/reports/filters/#{@report_type}", locals: { f: f }
|
|
- if @report_subtype && lookup_context.exists?(@report_subtype, "admin/reports/filters", true)
|
|
= render partial: "admin/reports/filters/#{@report_subtype}", locals: { f: f }
|
|
|
|
%fieldset.print-hidden
|
|
%legend{ align: 'center'}= t(:report_render_options)
|
|
= render partial: "rendering_options"
|
|
|
|
#report-go.actions.filter-actions{ data: { controller: "scoped-channel", "scoped-channel-id-value": request.uuid } }
|
|
= button t(:go), "report__submit-btn", "submit", "data-disable": true
|
|
|
|
.report__header.print-hidden
|
|
- if @report.message.present?
|
|
%p.report__message= @report.message
|
|
- if request.post? && !@error
|
|
%button.btn-print.icon-print{ onclick: "window.print()"}= t(:report_print)
|
|
|
|
= t(@error, link: link_to(t(".report_link_label"), @error_url)) if @error
|
|
|
|
#report-table{ data: { controller: "scoped-channel", "scoped-channel-id-value": request.uuid } }
|
|
= @table
|