<%= render :partial => "base/title", :locals => {:title => "購入履歴一覧"} %>

<% if @orders && !@orders.empty? %>
<% @orders.each do | order | %>
<%- order_delivery = order.order_deliveries[0] -%>
■<%= date_time(order.received_at) %>
<br/>
注文番号:<%=h order.code %>
<br/>
合計金額:<%=number_with_delimiter order.total %>円
<br/>
<div style="text-align:center;">
    <%= button_to '詳細', :action => 'history_show', :id => order.id %>
    <br/>
</div>
<% end %>
<%= will_paginate @orders %>
<% else %>
<div style="text-align:center;">
    購入履歴はありません。
</div>
<% end %>

