27 lines
1 KiB
Text
27 lines
1 KiB
Text
- unless @orders.empty? && @multi_orders.empty?
|
|
- if Order.finished.count > 20
|
|
= items_per_page
|
|
= pagination_links_remote @orders
|
|
-# following posed a real problem, multiple submit buttons are within the same form, so only one of them will be submitted
|
|
-# convert to javascript
|
|
= form_with url: multi_orders_path, method: :post, local: true do |form|
|
|
%table.table.table-striped
|
|
%thead
|
|
%tr
|
|
%th=I18n.t('activerecord.attributes.group_order_invoice.links.combine')
|
|
%th= t('.name')
|
|
%th= t('.end')
|
|
%th= t('.state')
|
|
%th= heading_helper Order, :updated_by
|
|
%th= heading_helper GroupOrderInvoice, :name
|
|
%th
|
|
%th
|
|
%tbody
|
|
- @multi_orders.each do |multi_order|
|
|
= render partial: 'multi_order_row', locals: { multi_order: multi_order }
|
|
- @orders.each do |order|
|
|
= render partial: 'order_row', locals: { order: order }
|
|
= form.submit "Zusammenführen", class: 'btn btn-primary'
|
|
|
|
- else
|
|
%i= t('.no_closed_orders')
|