Sha256: 1677e9b654298ebc336b6d498afb5093a8b69f68e4221aa42c31ed39793cf5f6

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

<!-- Modified cart view with PayPal button, from solidus_paypal_braintree -->

<% @body_id = 'cart' %>
<div data-hook="cart_container">
  <h1><%= t('spree.shopping_cart') %></h1>

  <% if @order.line_items.empty? %>

    <div data-hook="empty_cart">
      <p><%= t('spree.your_cart_is_empty') %></p>
      <p><%= link_to t('spree.continue_shopping'), products_path, class: 'button continue' %></p>
    </div>

  <% else %>

    <div data-hook="outside_cart_form">
      <%= form_for @order, url: update_cart_path, html: {id: 'update-cart'} do |order_form| %>
        <div data-hook="inside_cart_form">

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

          <div class="links columns sixteen alpha omega" data-hook="cart_buttons">
            <%= order_form.text_field :coupon_code, size: 10, placeholder: t('spree.coupon_code') %>
            <%= button_tag class: 'primary', id: 'update-button' do %>
              <%= t('spree.update') %>
            <% end %>
            <%= button_tag class: 'button checkout primary', id: 'checkout-link', name: 'checkout' do %>
              <%= t('spree.checkout') %>
            <% end %>
          </div>

        </div>
      <% end %>
    </div>

    <div id="empty-cart" data-hook>
      <%= form_tag empty_cart_path, method: :put do %>
        <p id="clear_cart_link" data-hook>
        <%= submit_tag t('spree.empty_cart'), class: 'button gray' %>
        <%= t('spree.or') %>
        <%= link_to t('spree.continue_shopping'), products_path, class: 'continue button gray' %>
        </p>
      <% end %>
    </div>

    <%= render "spree/shared/paypal_cart_button" %>
  <% end %>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_paypal_braintree-1.2.0 spec/fixtures/views/spree/orders/edit.html.erb
solidus_paypal_braintree-1.1.0 spec/fixtures/views/spree/orders/edit.html.erb
solidus_paypal_braintree-1.0.0 spec/fixtures/views/spree/orders/edit.html.erb