mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
= form_tag spree.customers_admin_reports_url do |f|
|
|
%br
|
|
.row
|
|
.four.columns.alpha
|
|
= label_tag nil, "Distributor: "
|
|
= select_tag(:distributor_id,
|
|
options_from_collection_for_select(@distributors, :id, :name, params[:distributor_id]),
|
|
{:include_blank => true, :class => "select2 fullwidth"})
|
|
|
|
.four.columns
|
|
= label_tag nil, "Supplier: "
|
|
= select_tag(:supplier_id,
|
|
options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id]),
|
|
{:include_blank => true, :class => "select2 fullwidth"})
|
|
|
|
.six.columns
|
|
= label_tag nil, "Order Cycle: "
|
|
= select_tag(:order_cycle_id,
|
|
options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]),
|
|
{:include_blank => true, :class => "select2 fullwidth"})
|
|
|
|
= label_tag nil, "Report Type: "
|
|
= select_tag(:report_type, options_for_select(@report_types, @report_type))
|
|
|
|
%br
|
|
%br
|
|
= check_box_tag :csv
|
|
= label_tag :csv, "Download as csv"
|
|
%br
|
|
= button t(:search)
|
|
|
|
%br
|
|
%br
|
|
%table#listing_customers.index
|
|
%thead
|
|
%tr{'data-hook' => "orders_header"}
|
|
- @report.header.each do |heading|
|
|
%th=heading
|
|
%tbody
|
|
- @report.table.each do |row|
|
|
%tr
|
|
- row.each do |column|
|
|
%td= column
|
|
- if @report.table.empty?
|
|
%tr
|
|
%td{:colspan => "2"}= t(:none)
|
|
|