foodsoft/app/views/orders/_orders.html.haml
Patrick Gansterer d73c206e29 Fix copy operation for stock orders
Stock orders have the supplier_id set to zero, which will be ignored
in the url-method by rails. Only use the order_id to fix this.
2020-03-23 17:20:21 +01:00

21 lines
819 B
Text

= pagination_links_remote @orders, :params => {:sort => params[:sort]}
%table.table.table-striped
%thead
%tr
%th= sort_link_helper heading_helper(Order, :supplier), "supplier"
%th= sort_link_helper heading_helper(Order, :pickup), "pickup"
%th= heading_helper Order, :starts
%th= sort_link_helper heading_helper(Order, :ends), "ends"
%th= heading_helper Order, :status
%th
%tbody
- @orders.each do |order|
%tr
%td= order.name
%td= format_date(order.pickup)
%td= format_time(order.starts)
%td= format_time(order.ends)
%td= t(order.state, scope: 'orders.state')
%td
= link_to t('ui.copy'), new_order_path(order_id: order), class: 'btn btn-small'
= link_to t('ui.show'), order, class: 'btn btn-small'