2009-01-06 11:49:19 +01:00
|
|
|
- if controller.action_name == 'myOrders'
|
2009-01-14 12:46:01 +01:00
|
|
|
= pagination_links_remote @bookedOrders, :per_page => 10, :params => {:show_all => params[:show_all]}
|
2009-01-06 11:49:19 +01:00
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th=_ 'Name'
|
|
|
|
%th=_ 'Supplier'
|
|
|
|
%th=_ 'End'
|
|
|
|
%th=_ 'Sum'
|
|
|
|
%tbody
|
|
|
|
- @bookedOrders.each do |order|
|
|
|
|
- if order.is_a?(GroupOrder) || order.is_a?(GroupOrderResult)
|
|
|
|
%tr{:class=> cycle('even', 'odd', :name => 'bookedOrders')}
|
|
|
|
%td= link_to order.order.name, :action => 'my_order_result', :id => order.order
|
|
|
|
%td=h order.order.supplier ? order.order.supplier.name : _("nonexistent")
|
|
|
|
%td= format_time(order.order.ends)
|
|
|
|
%td{:class => "currency"}= number_to_currency(order.price)
|
|
|
|
- else
|
2009-01-14 12:46:01 +01:00
|
|
|
// check if the Ordergroup has ordered
|
2009-01-06 11:49:19 +01:00
|
|
|
- if groupOrder = order.group_order(@orderGroup)
|
|
|
|
%tr{:class=> cycle('even', 'odd', :name => 'bookedOrders')}
|
|
|
|
%td= link_to order.name, :action => 'my_order_result', :id => order
|
|
|
|
%td=h order.supplier ? order.supplier.name : _("nonexistent")
|
|
|
|
%td= format_time(order.ends)
|
|
|
|
%td{:class => "currency"}= number_to_currency(groupOrder.price)
|
|
|
|
- else
|
|
|
|
%tr{:class=> cycle('even', 'odd', :name => 'bookedOrders'), :style => "color:grey"}
|
|
|
|
%td= link_to truncate(order.name), {:action => "my_order_result", :id => order}, :style => "color:grey"
|
|
|
|
%td= order.supplier ? order.supplier.name : _("nonexistent")
|
|
|
|
%td= format_time(order.ends)
|
|
|
|
%td{:class => "currency"} --
|