|
| 1 | +<h1><%= accurate_title %></h1> |
| 2 | + |
| 3 | +<%= spree_current_user.decoration %> |
| 4 | + |
| 5 | +<div data-hook="account_summary" class="account-summary"> |
| 6 | + <dl id="user-info"> |
| 7 | + <dt><%= t('spree.email') %></dt> |
| 8 | + <dd><%= @user.email %> (<%= link_to t('spree.edit'), spree.edit_account_path %>)</dd> |
| 9 | + </dl> |
| 10 | +</div> |
| 11 | + |
| 12 | +<div data-hook="account_my_orders" class="account-my-orders"> |
| 13 | + |
| 14 | + <h3><%= t('spree.my_orders') %></h3> |
| 15 | + <% if @orders.present? %> |
| 16 | + <table class="order-summary"> |
| 17 | + <thead> |
| 18 | + <tr> |
| 19 | + <th class="order-number"><%= t(:number, scope: 'activerecord.attributes.spree/order') %></th> |
| 20 | + <th class="order-date"><%= t('spree.date') %></th> |
| 21 | + <th class="order-status"><%= t('spree.status') %></th> |
| 22 | + <th class="order-payment-state"><%= t('spree.payment_state') %></th> |
| 23 | + <th class="order-shipment-state"><%= t('spree.shipment_state') %></th> |
| 24 | + <th class="order-total"><%= t('spree.total') %></th> |
| 25 | + </tr> |
| 26 | + </thead> |
| 27 | + <tbody> |
| 28 | + <% @orders.each do |order| %> |
| 29 | + <tr class="<%= cycle('even', 'odd') %>"> |
| 30 | + <td class="order-number"><%= link_to order.number, order_url(order) %></td> |
| 31 | + <td class="order-date"><%= l order.completed_at.to_date %></td> |
| 32 | + <td class="order-status"><%= t("spree.order_state.#{order.state}").titleize %></td> |
| 33 | + <td class="order-payment-state"><%= t("spree.payment_states.#{order.payment_state}").titleize if order.payment_state %></td> |
| 34 | + <td class="order-shipment-state"><%= t("spree.shipment_states.#{order.shipment_state}").titleize if order.shipment_state %></td> |
| 35 | + <td class="order-total"><%= order.display_total %></td> |
| 36 | + </tr> |
| 37 | + <% end %> |
| 38 | + </tbody> |
| 39 | + </table> |
| 40 | + <% else %> |
| 41 | + <p><%= t('spree.you_have_no_orders_yet') %></p> |
| 42 | + <% end %> |
| 43 | + <br /> |
| 44 | + |
| 45 | +</div> |
0 commit comments