2012-11-10 16:44:05 +01:00
|
|
|
- unless @orders.empty?
|
|
|
|
- if Order.finished.count > 20
|
|
|
|
= items_per_page
|
|
|
|
= pagination_links_remote @orders
|
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-02-10 09:05:20 +01:00
|
|
|
%th= t('.name')
|
|
|
|
%th= t('.end')
|
|
|
|
%th= t('.state')
|
|
|
|
%th= t('.last_edited_by')
|
2012-11-10 16:44:05 +01:00
|
|
|
%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?
|
2013-06-12 22:37:02 +02:00
|
|
|
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : t('.ended')
|
2012-11-10 16:44:05 +01:00
|
|
|
%td= order.updated_by.nil? ? '??' : order.updated_by.nick
|
|
|
|
%td
|
|
|
|
- unless order.closed?
|
2013-02-10 09:05:20 +01:00
|
|
|
= 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),
|
|
|
|
:confirm => t('.confirm'), :method => :put, class: 'btn btn-mini'
|
2012-11-10 16:44:05 +01:00
|
|
|
- else
|
2013-06-12 22:37:02 +02:00
|
|
|
%i= t('.no_closed_orders')
|