OSDN Git Service

1a1c1e31e2f58e5d8b3ae57bbdc3043445cb9b94
[elecoma/elecoma.git] / app / views / accounts / history_list.html.erb
1 <% content_for :head do %>\r
2   <%= stylesheet_link_tag "front/mypage" %>\r
3 <% end %>\r
4 \r
5 <ol id="bread_list" class="m_btm"><li class="bread_top"><%= link_to "トップページ", :controller => :portal, :action => :show %></li><li><%= link_to "マイページ", :controller => :accounts, :action => :history_list %></li><li>購入履歴一覧</li></ol>\r
6 <h2 class="main_t">マイページ</h2>\r
7 <div id="mypage" class="clearfix">\r
8   <!-- マイメニュー -->\r
9   <%= render :partial=> "user/navigation" %>\r
10 \r
11   <!-- 購入履歴一覧 -->\r
12   <div id="mypage_main">\r
13     <h3><%= image_tag("mypage/mypage_t1.gif", :width => "535", :height => "44", :alt => "購入履歴一覧") %></h3>\r
14     <div class="mypage_box">\r
15     <% if @orders && !@orders.empty? %>\r
16       <div class="clearfix"><p class="history"><%= @orders.size %> 件の購入履歴があります。</p><p class="point_right">現在のポイント<%= @login_customer.point.to_i %>pt</p></div>\r
17       <p class="m_btm">※最大20件まで表示します。</p>\r
18       <table class="tb1 cntr">\r
19         <tr>\r
20           <th width="91">購入日時</th>\r
21           <th width="115">受注番号</th>\r
22           <th width="115">お支払い方法</th>\r
23           <th width="84">合計金額</th>\r
24           <th width="84">詳&nbsp;&nbsp;細</th>\r
25         </tr>\r
26         <% @orders.each do | order | %>\r
27           <%- order_delivery = order.order_deliveries[0] -%>\r
28           <tr>\r
29             <td><%= date_time(order.received_at) %></td>\r
30             <td><%= order.code %></td>\r
31             <td><%= order_delivery.payment.name %></td>\r
32             <td><%= number_with_delimiter(order.total) %>円</td>\r
33             <td><%= link_to '詳細を見る', :action => 'history_show', :id => order.id %></td>\r
34           </tr>\r
35         <% end %>\r
36       </table>\r
37     <% else %>\r
38       <h3>購入履歴はありません。<span id="point_right">現在のポイント<%= @login_customer.point.to_i %>pt</span></h3>\r
39     <% end %>\r
40   </div><!-- /購入履歴一覧 -->\r
41 \r
42   <div><%= image_tag("mypage/mypage_btm.gif", :width => "535", :height => "5", :alt => "") %></div>\r
43   </div><!-- /mypage_main -->\r
44 </div><!-- /mypage -->\r