<commit_before><nav class="menu">
  <ul data-hook="admin_order_tabs">
    <% if ((can? :update, @order) && (@order.shipments.count == 0 || @order.shipped_shipments.count == 0)) %>
      <li<%== ' class="active"' if current == 'Cart' %> data-hook='admin_order_tabs_order_details'>
        <%= link_to_with_icon 'shopping-cart', Spree.t(:cart), cart_admin_order_url(@order) %>
      </li>
    <% end %>

    <% if can?(:update, @order) && checkout_steps.include?("address") %>
      <li<%== ' class="active"' if current == 'Customer Details' %> data-hook='admin_order_tabs_customer_details'>
        <%= link_to_with_icon 'user', Spree.t(:customer_details), admin_order_customer_url(@order) %>
      </li>
    <% end %>

    <% if can? :update, @order %>
        <li<%== ' class="active"' if current == 'Shipments' %> data-hook='admin_order_tabs_order_details'>
          <%= link_to_with_icon 'edit', Spree.t(:shipments), edit_admin_order_url(@order) %>
        </li>
    <% end %>

    <% if can? :index, Spree::Adjustment %>
      <li<%== ' class="active"' if current == 'Adjustments' %> data-hook='admin_order_tabs_adjustments'>
        <%= link_to_with_icon 'cogs', Spree.t(:adjustments), admin_order_adjustments_url(@order) %>
      </li>
    <% end %>

    <% if can?(:index, Spree::Payment) %>
      <li<%== ' class="active"' if current == 'Payments' %> data-hook='admin_order_tabs_payments'>
        <%= link_to_with_icon 'credit-card', Spree.t(:payments), admin_order_payments_url(@order) %>
      </li>
    <% end %>

    <% if !@order.completed? && can?(:update, @order) %>
      <li<%== ' class="active"' if current == 'Confirm' %> data-hook='admin_order_tabs_confirm'>
        <%= link_to_with_icon 'check', Spree.t(:confirm), confirm_admin_order_url(@order) %>
      </li>
    <% end %>

    <% if can? :index, Spree::ReturnAuthorization %>
      <% if @order.completed? %>
        <li<%== ' class="active"' if current == 'Return Authorizations' %> data-hook='admin_order_tabs_return_authorizations'>
          <%= link_to_with_icon 'share', Spree.t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
        </li>
      <% end %>
    <% end %>

    <% if can? :index, Spree::CustomerReturn %>
      <% if @order.completed? %>
        <li<%== ' class="active"' if current == 'Customer Returns' %>>
          <%= link_to_with_icon 'download', Spree.t(:customer_returns), admin_order_customer_returns_url(@order) %>
        </li>
      <% end %>
    <% end %>

    <% if can?(:cancel, Spree::InventoryUnit) && @order.inventory_units.cancelable.present? %>
      <%= content_tag('li', :class => ('active' if current == 'Cancel Inventory'), :data => {:hook => 'admin_order_tabs_cancel_inventory'}) do %>
        <%= link_to_with_icon 'cancel', Spree.t(:cancel_inventory), admin_order_cancellations_path(@order) %>
      <% end %><commit_msg>Adjust order submenu permissions.<commit_after><nav class="menu">
  <ul data-hook="admin_order_tabs">
    <% if (@order.shipments.count == 0 || @order.shipped_shipments.count == 0) %>
      <li<%== ' class="active"' if current == 'Cart' %> data-hook='admin_order_tabs_order_details'>
        <%= link_to_with_icon 'shopping-cart', Spree.t(:cart), cart_admin_order_url(@order) %>
      </li>
    <% end %>

    <% if can?(:update, @order) && checkout_steps.include?("address") %>
      <li<%== ' class="active"' if current == 'Customer Details' %> data-hook='admin_order_tabs_customer_details'>
        <%= link_to_with_icon 'user', Spree.t(:customer_details), admin_order_customer_url(@order) %>
      </li>
    <% end %>

    <li<%== ' class="active"' if current == 'Shipments' %> data-hook='admin_order_tabs_order_details'>
      <%= link_to_with_icon 'edit', Spree.t(:shipments), edit_admin_order_url(@order) %>
    </li>

    <% if can? :display, Spree::Adjustment %>
      <li<%== ' class="active"' if current == 'Adjustments' %> data-hook='admin_order_tabs_adjustments'>
        <%= link_to_with_icon 'cogs', Spree.t(:adjustments), admin_order_adjustments_url(@order) %>
      </li>
    <% end %>

    <% if can?(:display, Spree::Payment) %>
      <li<%== ' class="active"' if current == 'Payments' %> data-hook='admin_order_tabs_payments'>
        <%= link_to_with_icon 'credit-card', Spree.t(:payments), admin_order_payments_url(@order) %>
      </li>
    <% end %>

    <% if !@order.completed? && can?(:update, @order) %>
      <li<%== ' class="active"' if current == 'Confirm' %> data-hook='admin_order_tabs_confirm'>
        <%= link_to_with_icon 'check', Spree.t(:confirm), confirm_admin_order_url(@order) %>
      </li>
    <% end %>

    <% if can? :display, Spree::ReturnAuthorization %>
      <% if @order.completed? %>
        <li<%== ' class="active"' if current == 'Return Authorizations' %> data-hook='admin_order_tabs_return_authorizations'>
          <%= link_to_with_icon 'share', Spree.t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
        </li>
      <% end %>
    <% end %>

    <% if can? :display, Spree::CustomerReturn %>
      <% if @order.completed? %>
        <li<%== ' class="active"' if current == 'Customer Returns' %>>
          <%= link_to_with_icon 'download', Spree.t(:customer_returns), admin_order_customer_returns_url(@order) %>
        </li>
      <% end %>
    <% end %>

    <% if can?(:short_ship, @order) && @order.inventory_units.cancelable.present? %>
      <%= content_tag('li', :class => ('active' if current == 'Cancel Inventory'), :data => {:hook => 'admin_order_tabs_cancel_inventory'}) do %>
        <%= link_to_with_icon 'cancel', Spree.t(:cancel_inventory), admin_order_cancellations_path(@order) %>
      <% end %>
{'fraction_non_alphanumeric': 0.19485553206483439, 'fraction_numerical': 0.0007047216349541931, 'mean_word_length': 3.852136752136752, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 123, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2890178', 'n_tokens_mistral': 2045, 'n_tokens_neox': 1847, 'n_words': 321}