app/views/comable/orders/confirm.slim in comable_frontend-0.2.3 vs app/views/comable/orders/confirm.slim in comable_frontend-0.3.0
- old
+ new
@@ -1,35 +1,78 @@
-h1 注文情報確認
+#comable-order
+ h1
+ = @order.class.human_state_name(:confirm)
-.order
- .bill_address
- h2
- | Billing address
- = render 'comable/shared/address', address: @order.bill_address if @order.bill_address
+ section.col-sm-8
+ .row
+ .col-sm-4.comable-bill_address
+ h2
+ = @order.class.human_attribute_name(:bill_address)
+ .comable-email
+ = @order.email
+ = render 'comable/shared/address', address: @order.bill_address
- .ship_address
- h2
- | Shipping address
- = render 'comable/shared/address', address: @order.ship_address if @order.ship_address
+ .col-sm-4.comable-ship_address
+ h2
+ = @order.class.human_attribute_name(:ship_address)
+ = render 'comable/shared/address', address: @order.ship_address
- .details
- h2
- | Order details
- - @order.order_deliveries.first.order_details.each do |order_detail|
- .name
- = order_detail.stock.name
- .price
- = order_detail.price
- .quantity
- = order_detail.quantity
+ - if @order.payment_method
+ .col-sm-4.comable-payment_method
+ h2
+ = @order.class.human_attribute_name(:payment_method)
+ = @order.payment_method.name
- .total
- h2 お会計
- .item_total_price
- = number_to_currency @order.current_item_total_price
- .shipment_fee
- = number_to_currency @order.current_shipment_fee
- .total_price
- = number_to_currency @order.current_total_price
+ - if @order.shipment_method
+ .row
+ .col-sm-12.comable-shipment_method
+ h2
+ = @order.class.human_attribute_name(:shipment_method)
+ = @order.shipment_method.name
- = form_for @order, as: :order, url: comable.order_path, method: :post do |f|
- = f.submit
+ .row
+ .col-sm-12.comable-order_details
+ table
+ thead
+ tr
+ th
+ th
+ = @order.order_details.human_attribute_name(:price)
+ th
+ = @order.order_details.human_attribute_name(:quantity)
+
+ tbody
+ - @order.order_details.each do |order_detail|
+ tr
+ td
+ .name
+ = order_detail.name_with_sku
+ .caption
+ = order_detail.product.caption
+ td.price
+ = number_to_currency order_detail.price
+ td.quantity
+ = number_with_delimiter order_detail.quantity
+
+ aside.col-sm-4
+ table
+ thead
+ tr
+ th colspan="2"
+ = form_for @order, as: :order, url: comable.order_path, method: :post do |f|
+ = f.submit Comable.t('complete_order')
+ tbody
+ tr
+ th.text-right
+ = @order.class.human_attribute_name(:item_total_price)
+ td
+ = number_to_currency @order.current_item_total_price
+ tr
+ th.text-right
+ = @order.class.human_attribute_name(:shipment_fee)
+ td
+ = number_to_currency @order.current_shipment_fee
+ tr
+ th.text-right
+ = @order.class.human_attribute_name(:total_price)
+ td
+ = number_to_currency @order.current_total_price