- if @order.bill_address.present?
  = @order.bill_address.firstname
  = @order.bill_address.lastname
  \-

- content_for :sidebar_title do
  = t(:order_information)

- content_for :sidebar do
  %header#order_tab_summary
    %dl.additional-info
      %dt#order_status
        = t(:status)
      %dd
        - order_state_classes = "state #{@order.state}"
        %span{ class: order_state_classes }
          = t(@order.state, scope: "spree.order_state")
      %dt
        = t(:total)
        \:
      %dd#order_total
        = @order.display_total.to_html

      - if @order.completed?
        %dt
          = t(:shipment)
          \:
        %dd#shipment_status
          - shipment_state_classes = "state #{@order.shipment_state}"
          %span{ class: shipment_state_classes }
            = t(@order.shipment_state, scope: [:spree, :shipment_states], default: [:missing, "none"])
        %dt
          = t(:payment)
          \:
        %dd#payment_status
          - payment_state_classes = "state #{@order.payment_state}"
          %span{ class: payment_state_classes }
            = t(@order.payment_state, scope: [:spree, :payment_states], default: [:missing, "none"])
        %dt
          = t(:date_completed)
          \:
        %dd#date_complete
          = pretty_time(@order.completed_at)

  - if @order.distributor && @order.order_cycle
    %nav.menu
      %ul
        - customer_details_classes = "active" if current == "Customer Details"
        %li{ class: customer_details_classes }
          = link_to_with_icon 'icon-user', t(:customer_details), spree.admin_order_customer_url(@order)

        - order_details_classes = "active" if current == "Order Details"
        %li{ class: order_details_classes }
          = link_to_with_icon 'icon-edit', t(:order_details), spree.edit_admin_order_url(@order)

        - payments_classes = "active" if current == "Payments"
        %li{ class: payments_classes }
          = link_to_with_icon 'icon-credit-card', t(:payments), spree.admin_order_payments_url(@order)

        - adjustments_classes = "active" if current == "Adjustments"
        %li{ class: adjustments_classes }
          = link_to_with_icon 'icon-cogs', t(:adjustments), spree.admin_order_adjustments_url(@order)

        - if feature?(:invoices, spree_current_user) && @order.can_show_invoice?
          - invoices_classes = "active" if current == 'Invoices'
          %li{ class: invoices_classes }
            = link_to_with_icon 'icon-cogs', t(:invoices), spree.admin_order_invoices_url(@order)

        - if @order.completed?
          - authorizations_classes = "active" if current == "Return Authorizations"
          %li{ class: authorizations_classes }
            = link_to_with_icon 'icon-share-alt', t(:return_authorizations), spree.admin_order_return_authorizations_url(@order)
