<commit_before>%div{ :id => "shipment_#{shipment.id}" }
  %fieldset.no-border-bottom
    %legend.stock-location{ :align => "center", "data-hook" => "stock-location" }
      %span.shipment-number
        = shipment.number
      = "-"
      %span.shipment-state
        = Spree.t("shipment_states.#{shipment.state}")
      - if shipment.ready? and can? :update, shipment
        = "-"
        = link_to t(:ship), '#', :class => 'ship button icon-arrow-right', :data => { 'shipment-number' => shipment.number }

  %table.stock-contents.index{ "data-hook" => "stock-contents" }
    %colgroup
      %col{ :style => "width: 10%;" }
      %col{ :style => "width: 30%;" }
      %col{ :style => "width: 15%;" }
      %col{ :style => "width: 15%;" }
      %col{ :style => "width: 15%;" }
      %col{ :style => "width: 15%;" }

    %thead
      %th{ :colspan => "2" }
        = Spree.t(:item_description)
      %th
        = Spree.t(:price)
      %th
        = Spree.t(:quantity)
      %th
        = Spree.t(:total)
      %th.orders-actions.actions{ "data-hook" => "admin_order_form_line_items_header_actions" }

    %tbody{ "data-shipment-number" => "#{shipment.number}", "data-order-number" => "#{order.number}" }
      = render 'spree/admin/orders/shipment_manifest', order: order, shipment: shipment

      - unless shipment.shipped?
        %tr.edit-method.hidden.total
          %td{ :colspan => "5" }
            %div.field.alpha.five.columns
              = label_tag 'selected_shipping_rate_id', Spree.t(:shipping_method)
              = select_tag :selected_shipping_rate_id, options_for_select(shipment.shipping_rates.backend.map { |sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id), { :class => 'select2 fullwidth', :data => { 'shipment-number' => shipment.number } }

            - if shipment.adjustment && shipment.adjustment.closed?
              %div.field.omega.four.columns
                %label
                  = Spree.t(:associated_adjustment_closed)
                %ul
                  %li
                    = radio_button_tag :open_adjustment, 'yes', false, :data => { 'shipment-number' => shipment.number }
                    = "Yes"
                  %li
                    = radio_button_tag :open_adjustment, 'no', true, :data => {'shipment-number' => shipment.number }
                    = "No"

          %td.actions
            - if can? :update, shipment
              = link_to '', '#', :class => 'save-method icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, title: I18n.t('actions.save')
              = link_to '', '#', :class => 'cancel-method icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel')

      %tr.show-method.total
        %td{ :colspan => "4" }
          - if shipment.adjustment.present?
            %strong
              = "#{shipment.adjustment.label}: #{shipment.shipping_method.name}"
          - else
            = Spree.t(:cannot_set_shipping_method_without_address)

        %td.total{ :align => "center" }
          - if shipment.adjustment.present?
            %span
              = shipment.adjustment.display_amount

        - if shipment.adjustment.present? && !shipment.shipped?
          %td.actions
            - if can? :update, shipment
              = link_to '', '#', :class => 'edit-method icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')

      %tr.edit-tracking.hidden.total
        %td{ :colspan => "5" }
          %label
            = "#{Spree.t(:tracking_number)}:"
          = text_field_tag :tracking, shipment.tracking

        %td.actions
          - if can? :update, shipment
            = link_to '', '#', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, :title => I18n.t('actions.save')
            = link_to '', '#', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel')

      %tr.show-tracking.total
        %td{ :colspan => "5" }
          - if shipment.tracking.present?
            %strong
              = "#{Spree.t(:tracking)}:"
            = shipment.tracking
          - else
            = Spree.t(:no_tracking_present)

        %td.actions
          - if can? :update, shipment
            = link_to '', '#', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')<commit_msg>remove '#' as path for link_to<commit_after>%div{ :id => "shipment_#{shipment.id}" }
  %fieldset.no-border-bottom
    %legend.stock-location{ :align => "center", "data-hook" => "stock-location" }
      %span.shipment-number
        = shipment.number
      = "-"
      %span.shipment-state
        = Spree.t("shipment_states.#{shipment.state}")
      - if shipment.ready? and can? :update, shipment
        = "-"
        = link_to t(:ship), '#', :class => 'ship button icon-arrow-right', :data => { 'shipment-number' => shipment.number }

  %table.stock-contents.index{ "data-hook" => "stock-contents" }
    %colgroup
      %col{ :style => "width: 10%;" }
      %col{ :style => "width: 30%;" }
      %col{ :style => "width: 15%;" }
      %col{ :style => "width: 15%;" }
      %col{ :style => "width: 15%;" }
      %col{ :style => "width: 15%;" }

    %thead
      %th{ :colspan => "2" }
        = Spree.t(:item_description)
      %th
        = Spree.t(:price)
      %th
        = Spree.t(:quantity)
      %th
        = Spree.t(:total)
      %th.orders-actions.actions{ "data-hook" => "admin_order_form_line_items_header_actions" }

    %tbody{ "data-shipment-number" => "#{shipment.number}", "data-order-number" => "#{order.number}" }
      = render 'spree/admin/orders/shipment_manifest', order: order, shipment: shipment

      - unless shipment.shipped?
        %tr.edit-method.hidden.total
          %td{ :colspan => "5" }
            %div.field.alpha.five.columns
              = label_tag 'selected_shipping_rate_id', Spree.t(:shipping_method)
              = select_tag :selected_shipping_rate_id, options_for_select(shipment.shipping_rates.backend.map { |sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id), { :class => 'select2 fullwidth', :data => { 'shipment-number' => shipment.number } }

            - if shipment.adjustment && shipment.adjustment.closed?
              %div.field.omega.four.columns
                %label
                  = Spree.t(:associated_adjustment_closed)
                %ul
                  %li
                    = radio_button_tag :open_adjustment, 'yes', false, :data => { 'shipment-number' => shipment.number }
                    = "Yes"
                  %li
                    = radio_button_tag :open_adjustment, 'no', true, :data => {'shipment-number' => shipment.number }
                    = "No"

          %td.actions
            - if can? :update, shipment
              = link_to '', '', :class => 'save-method icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, title: I18n.t('actions.save')
              = link_to '', '', :class => 'cancel-method icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel')
      %tr.show-method.total
        %td{ :colspan => "4" }
          - if shipment.adjustment.present?
            %strong
              = "#{shipment.adjustment.label}: #{shipment.shipping_method.name}"
          - else
            = Spree.t(:cannot_set_shipping_method_without_address)

        %td.total{ :align => "center" }
          - if shipment.adjustment.present?
            %span
              = shipment.adjustment.display_amount

        - if shipment.adjustment.present? && !shipment.shipped?
          %td.actions
            - if can? :update, shipment
              = link_to '', '', :class => 'edit-method icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')

      %tr.edit-tracking.hidden.total
        %td{ :colspan => "5" }
          %label
            = "#{Spree.t(:tracking_number)}:"
          = text_field_tag :tracking, shipment.tracking

        %td.actions
          - if can? :update, shipment
            = link_to '', '', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, :title => I18n.t('actions.save')
            = link_to '', '', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel')

      %tr.show-tracking.total
        %td{ :colspan => "5" }
          - if shipment.tracking.present?
            %strong
              = "#{Spree.t(:tracking)}:"
            = shipment.tracking
          - else
            = Spree.t(:no_tracking_present)

        %td.actions
          - if can? :update, shipment
            = link_to '', '', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')
{'fraction_non_alphanumeric': 0.17202782003912193, 'fraction_numerical': 0.005650945446642034, 'mean_word_length': 2.178929188255613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 111, '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': '407512', 'n_tokens_mistral': 3026, 'n_tokens_neox': 2868, 'n_words': 537}