Sha256: 9ced6ccca83e593dfe9915efb33d04b48892374f360e31e6e6e28b7238e7c373

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

<%= form_for(current_order, method: :post, url: new_order_path) do |form| %>
  <table id="bodega-cart">
    <thead>
      <tr><th class="product-name" colspan="2"><%= t 'bodega.product' %></th><th class="product-price"><%= t 'bodega.price' %></th><th class="product-total" colspan="2"><%= t 'bodega.total' %></th></tr>
    </thead>
    <tbody>
      <%= form.fields_for(:order_products) do |order_product_form| -%>
      <%= render partial: 'cart_row', locals: {form: order_product_form, order_product: order_product_form.object} %>
      <% end =%>
    </tbody>
    <tfoot>
      <%= render partial: 'shipping_row', locals: {form: form} if current_order.shipping_method %>
      <% if current_order.ready? -%>
      <tr>
        <td class="product-total-label" colspan="3"><%= t 'bodega.total' %></td>
        <td class="product-total"><%= humanized_money_with_symbol current_order.total %></td>
        <td></td>
      </tr>
      <% end -%>
    </tfoot>
  </table>
  <% if current_order.ready? -%>
  <%= button_tag t('bodega.update_cart'), id: 'bodega-update', name: :update, value: 1 %>
  <%= button_tag t('bodega.check_out'), id: 'bodega-checkout', name: :checkout, value: 1 %>
  <% else -%>
  <%= button_tag t('bodega.calculate_shipping'), id: 'bodega-update', name: :update, value: 1 %>
  <% end -%>
<% end =%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bodega-0.4.4 app/views/bodega/orders/_cart.html.erb
bodega-0.4.3 app/views/bodega/orders/_cart.html.erb
bodega-0.4.2 app/views/bodega/orders/_cart.html.erb