<commit_before><div id="cart" class="well">
  <div id="cartSpinner"></div>
  <% if cannot? :manage, Reservation %>
    <h2>My Cart</h2><br />
  <% else %>
    <h2>Cart</h2><br />
  <% end %>
  <%# allow user to set start/end dates %>
  <%= render partial: 'reservations/cart_dates' %>
  <h3>Items</h3>
  <%# list items in cart %>
  <%= render partial: 'reservations/list_items_in_cart' %>
  <hr />
  <div class="row">
    <div class="span3" id="cart_buttons">
    <%= link_to "Empty cart".titleize, empty_cart_path, method: :delete, class: "btn btn-default", id: 'empty_cart_btn', remote: true %>
    <%# print Make reservation button %>
    <% if can? :create, Reservation %>
      <%= link_to sanitize("#{content_tag :i, nil, class: "fa fa-shopping-cart"} #{"Make reservation".titleize}"), new_reservation_path, class: "btn btn-success" %>
    <% else %>
      <%= link_to sanitize("#{content_tag :i, nil, class: "fa fa-sign-in"} #{"Sign in".titleize}"), new_user_session_path, class: "btn btn-success" %>
    <% end %>
    </div>
  </div>
</div><commit_msg>refactor cart sidebar [ci skip]<commit_after><div id="cart" class="well">
  <div id="cartSpinner"></div>
  <% if cannot? :manage, Reservation %>
    <h2>My Cart</h2><br />
  <% else %>
    <h2>Cart</h2><br />
  <% end %>
  <%# allow user to set start/end dates %>
  <%= render partial: 'reservations/cart_dates' %>
  <h3>Items</h3>
  <%# list items in cart %>
  <%= render partial: 'reservations/list_items_in_cart' %>
  <hr />
  <%# print Make reservation button %>
  <% if can? :create, Reservation %>
    <%= link_to new_reservation_path, class: 'btn btn-success' do %>
      <%= content_tag :i, nil, class: 'fa fa-shopping-cart' %>
      <%= 'Reserve'.titleize %>
    <% end %>
  <% else %>
    <%= link_to new_user_session_path, class: 'btn btn-success' do %>
      <%= content_tag :i, nil, class: 'fa fa-sign-in' %>
      <%= 'Sign in'.titleize %>
    <% end %>
  <% end %>
  <%= link_to 'Empty cart'.titleize, empty_cart_path, method: :delete, class: 'btn btn-default', id: 'empty_cart_btn', remote: true %>
</div>
{'fraction_non_alphanumeric': 0.20230658337337817, 'fraction_numerical': 0.006246996636232581, 'mean_word_length': 3.6786516853932585, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, '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': '6710568', 'n_tokens_mistral': 821, 'n_tokens_neox': 748, 'n_words': 179}