<commit_before><% content_for :page_actions do %>
  <% if can?(:fire, @order) %>
    <li><%= event_links %></li>
  <% end %>
  <% if can?(:resend, @order) && @order.completed? %>
    <li><%= button_to t('spree.resend'), resend_admin_order_url(@order), method: :post, class: 'btn btn-primary' %></li>
  <% end %>
<% end %>

<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'Shipments' } %>
<% admin_breadcrumb(plural_resource_name(Spree::Shipment)) %>

<div data-hook="admin_order_edit_header">
  <%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
</div>

<% if @order.payments.exists? && @order.is_risky? %>
  <%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.reorder("created_at DESC").first %>
<% end %>

<% if @order.line_items.empty? %>
  <div class="no-objects-found">
    <p><%= t('spree.your_order_is_empty_add_product') %></p>
    <%= link_to t('spree.cart'), spree.cart_admin_order_url(@order), class: 'btn btn-primary' %>
  </div>
<% end %>

<div data-hook="admin_order_edit_form">
  <div id="order-form-wrapper">
    <%= render partial: 'form', locals: { order: @order } %><commit_msg>Add hook for retrocompatibility extension<commit_after><% content_for :page_actions do %>
  <% if can?(:fire, @order) %>
    <li><%= event_links %></li>
  <% end %>
  <% if can?(:resend, @order) && @order.completed? %>
    <li><%= button_to t('spree.resend'), resend_admin_order_url(@order), method: :post, class: 'btn btn-primary' %></li>
  <% end %>
<% end %>

<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'Shipments' } %>
<% admin_breadcrumb(plural_resource_name(Spree::Shipment)) %>

<div data-hook="admin_order_edit_header">
  <%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
</div>

<% if @order.payments.exists? && @order.is_risky? %>
  <%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.reorder("created_at DESC").first %>
<% end %>

<div data-hook="admin_order_edit_sub_header" />

<% if @order.line_items.empty? %>
  <div class="no-objects-found">
    <p><%= t('spree.your_order_is_empty_add_product') %></p>
    <%= link_to t('spree.cart'), spree.cart_admin_order_url(@order), class: 'btn btn-primary' %>
  </div>
<% end %>

<div data-hook="admin_order_edit_form">
  <div id="order-form-wrapper">
    <%= render partial: 'form', locals: { order: @order } %>
{'fraction_non_alphanumeric': 0.21331689272503082, 'fraction_numerical': 0.0, 'mean_word_length': 5.162025316455696, 'pattern_counts': {'":': 0, '<': 66, '<?xml version=': 0, '>': 66, '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': '129242', 'n_tokens_mistral': 959, 'n_tokens_neox': 889, 'n_words': 160}