<commit_before><% @body_id = 'cart' %>

<h1><%= t(:shopping_cart) %></h1>

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

  <div data-hook="empty_cart">
    <p><%= t(:your_cart_is_empty) %></p>
    <p><%= link_to t(: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 :partial => 'form', :locals => { :order_form => order_form } %>
        </div>

        <div id="subtotal" data-hook>
          <h3><%= "#{t(:subtotal)}: #{order_subtotal(@order)}" %></h3>
          <div class="links" data-hook="cart_buttons">
            <%= button_tag :class => 'large primary', :id => 'update-button' do %>
              <%= image_tag('icons/update.png') + t(:update) %>
            <% end %>
            <%= link_to image_tag('icons/checkout.png') + t(:checkout), checkout_path, :class => 'button checkout primary', :id => 'checkout-link' %>
          </div>
        </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(:empty_cart), :class => 'button' %>
      <%= t(:or) %>
      <%= link_to t(:continue_shopping), products_path, :class => 'continue' %>
    </p>
  <% end %>
  </div>
<% end %>
<commit_msg>Move update and checkout links outside of subtotal area for cart page<commit_after><% @body_id = 'cart' %>

<h1><%= t(:shopping_cart) %></h1>

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

  <div data-hook="empty_cart">
    <p><%= t(:your_cart_is_empty) %></p>
    <p><%= link_to t(: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 :partial => 'form', :locals => { :order_form => order_form } %>
        </div>

        <div id="subtotal" data-hook>
          <h3><%= "#{t(:subtotal)}: #{order_subtotal(@order)}" %></h3>
        </div>

        <div class="links" data-hook="cart_buttons">
          <%= button_tag :class => 'large primary', :id => 'update-button' do %>
            <%= image_tag('icons/update.png') + t(:update) %>
          <% end %>
          <%= link_to image_tag('icons/checkout.png') + t(:checkout), checkout_path, :class => 'button checkout primary', :id => 'checkout-link' %>
        </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(:empty_cart), :class => 'button' %>
      <%= t(:or) %>
      <%= link_to t(:continue_shopping), products_path, :class => 'continue' %>
    </p>
  <% end %>
  </div>
<% end %>

{'fraction_non_alphanumeric': 0.22062193126022914, 'fraction_numerical': 0.002618657937806874, 'mean_word_length': 2.973992197659298, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5095465', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1086, 'n_words': 221}