7841245795
Conflicts: Gemfile.lock
31 lines
1.3 KiB
Text
31 lines
1.3 KiB
Text
- unless @orders.empty?
|
|
- if Order.finished.count > 20
|
|
= items_per_page
|
|
= pagination_links_remote @orders
|
|
%table.table.table-striped
|
|
%thead
|
|
%tr
|
|
%th= t('.name')
|
|
%th= t('.end')
|
|
%th= t('.state')
|
|
%th= t('.last_edited_by')
|
|
%th
|
|
%tbody
|
|
- @orders.each do |order|
|
|
%tr{:class => cycle("even","odd", :name => "order")}
|
|
%td= link_to truncate(order.name), new_finance_order_path(order_id: order.id)
|
|
%td=h format_time(order.ends) unless order.ends.nil?
|
|
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : t('.ended')
|
|
%td= show_user(order.updated_by)
|
|
%td
|
|
- unless order.closed?
|
|
- if current_user.role_orders?
|
|
- unless order.stockit?
|
|
= link_to t('orders.index.action_receive'), receive_order_path(order), class: 'btn btn-mini'
|
|
- else
|
|
= link_to t('orders.index.action_receive'), '#', class: 'btn btn-mini disabled'
|
|
= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini btn-primary'
|
|
= link_to t('.close'), close_direct_finance_order_path(order),
|
|
:data => {:confirm => t('.confirm')}, :method => :patch, class: 'btn btn-mini'
|
|
- else
|
|
%i= t('.no_closed_orders')
|