Module: Admin::OverviewHelper

Defined in:
app/helpers/admin/overview_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_ordes(orders, later = false) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'app/helpers/admin/overview_helper.rb', line 2

def render_ordes(orders, later=false)
  text = []
  if orders.any?
    # TODO: handle Order objects, create partials for this
    # orders.each_with_index {|order, i| text << render(:partial => "#{order.mode}_event", :locals => {:order => order, :shaded => (i % 2 > 0), :later => later}) }
  else
    text << %w(<li class="order-none shade">No orders</li>)
  end
  %(<ul class="orders">#{text.join}</ul>)
end