Files
openfoodnetwork/app/views/spree/admin/orders/_table.html.haml
David Cook b92c046119 Automatically bind toggleAll action
We are already specifying the element's role ('all') in the HTML. Its behaviour should be predefined; there's no need to also specify in the HTML.

The eventhandler doesn't need to be cleand up on disconnect, because they are removed along with the DOM object.
2025-02-20 11:24:21 +11:00

31 lines
1.0 KiB
Plaintext

.row.index-controls
%div{ style: "display: flex; justify-content: space-between;" }
= render partial: "bulk_actions"
.per-page.right
= render partial: 'admin/shared/stimulus_page_controls', locals: { pagy: pagy }
%table#listing_orders.index.responsive{width: "100%" }
%colgroup
%col{style: "width: 3%"}
%thead
%tr
%th
%input#selectAll{ type: 'checkbox', 'data-checked-target': "all" }
%th
= t(:products_distributor)
- columns = ['completed_at', 'number', 'state', 'payment_state', 'shipment_state', 'email', 'billing_address_name', 'total']
= render partial: "spree/admin/shared/stimulus_sortable_header", collection: columns, as: :column,
locals: { sorted: params.dig(:q, :s), default: "completed_at desc" }
%th.actions
%tbody
= render partial: "table_row", collection: orders, as: :order
- if pagy&.count&.positive?
= render partial: "admin/shared/stimulus_pagination", locals: { pagy: pagy }
- else
.no-objects-found= t('spree.admin.orders.index.no_orders_found')