Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code styles for /cart #1727

Merged
merged 1 commit into from
Mar 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions frontend/app/views/spree/orders/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
<% order = order_form.object %>
<%= render 'spree/shared/error_messages', target: order %>
<table id="cart-detail" data-hook>
<thead>
<tr data-hook="cart_items_headers">
Expand All @@ -10,19 +11,19 @@
</tr>
</thead>
<tbody id="line_items" data-hook>
<%= render partial: 'spree/orders/line_item', collection: order_form.object.line_items, locals: {order_form: order_form} %>
<%= render partial: 'spree/orders/line_item', collection: order.line_items, locals: { order_form: order_form } %>
</tbody>
<% if @order.adjustments.nonzero.exists? || @order.line_item_adjustments.nonzero.exists? || @order.shipment_adjustments.nonzero.exists? || @order.shipments.any? %>
<% if order.adjustments.nonzero.exists? || order.line_item_adjustments.nonzero.exists? || order.shipment_adjustments.nonzero.exists? || order.shipments.any? %>
<tr class="cart-subtotal">
<td colspan="4" align='right'><h5><%= Spree.t(:cart_subtotal, count: @order.line_items.sum(:quantity)) %></h5></th>
<td colspan><h5><%= order_form.object.display_item_total %></h5></td>
<td colspan="4" align='right'><h5><%= Spree.t(:cart_subtotal, count: order.line_items.sum(:quantity)) %></h5></th>
<td colspan><h5><%= order.display_item_total %></h5></td>
<td></td>
</tr>
<%= render "spree/orders/adjustments" %>
<% end %>
<tr class="cart-total">
<td colspan="4" align='right'><h5><%= Spree.t(:total) %></h5></th>
<td colspan><h5><%= order_form.object.display_total %></h5></td>
<td colspan><h5><%= order.display_total %></h5></td>
<td></td>
</tr>
</table>
2 changes: 1 addition & 1 deletion frontend/app/views/spree/orders/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div data-hook="inside_cart_form">

<div data-hook="cart_items">
<%= render partial: 'form', locals: { order_form: order_form } %>
<%= render 'form', order_form: order_form %>
</div>

<div class="links columns sixteen alpha omega" data-hook="cart_buttons">
Expand Down