<div class="modal fade" id="modal-history">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Historia statusów</h4>
      </div>
      <div class="modal-body">

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default pull-right" data-dismiss="modal">Zamknij</button>
      </div>
    </div>
    <!-- /.modal-content -->
  </div>
</div>
<!-- /.modal -->
<div class="row">
  <div class="col-md-4">
    <div class="box box-primary box-solid">
      <div class="box-header with-border">
        <i class="fa fa-map-o"></i>
        <h3 class="box-title">Dane adresowe</h3>
      </div>
      <div class="box-body">
        <dl class="dl-horizontal">
          <dt>Imię i nazwisko</dt>
          <dd><%= @order.full_name %></dd>
          <dt>Email</dt>
          <dd><%= @order.email %></dd>
          <dt>Ulica</dt>
          <dd><%= @order.street %></dd>
          <dt>Miasto</dt>
          <dd><%= @order.zip_code %> <%= @order.city %></dd>
          <dt>Telefon</dt>
          <dd><%= @order.phone %></dd>
        </dl>
    </div>
  </div>
  </div>
  <div class="col-md-4">
    <div class="box box-success box-solid">
      <div class="box-header with-border">
        <i class="fa fa-info"></i>
        <h3 class="box-title">Informacje</h3>
      </div>
      <div class="box-body">
        <dl class="dl-horizontal">
          <dt>Numer zamówienia</dt>
          <dd><%= @order.beauty_id %></dd>
          <dt>Data zamówienia</dt>
          <dd><%= @order.created_at %></dd>
          <dt>Dostawa</dt>
          <dd><%= @order.shipping.name %></dd>
          <dt>Sposób płatności</dt>
          <dd><%= @order.payment_method.name %></dd>
          <dt>Wiadomość</dt>
          <dd><%= raw @order.message_from_client.gsub(/(\r\n|\n\r|\r|\n)/, '<br \>') unless @order.message_from_client.blank? %></dd>
        </dl>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="box box-info box-solid">
      <div class="box-header with-border">
        <i class="fa fa-bars"></i>
        <h3 class="box-title">Status zamówienia</h3>
      </div>
      <div class="box-body">
        <dl class="dl-horizontal">
          <dt>Aktualny status</dt>
          <dd id="actual_status"><%= raw(Order::ORDER_STATUSES_HTML[@order.status]) %></dd>
          <br />
          <dt>Historia statusów</dt>
          <dd><%= link_to raw('<i class="fa fa-fw fa-history"></i> Pokaż historię'), {controller: '/ps_admin/order', action: :status_histories, id: @order.id}, class: 'btn btn-info btn-xs', 'data-toggle': 'modal', 'data-target': '#modal-history' %></dd>
          <br />
          <dt>Zmień status na: </dt>
          <dd id="actual_status_buttons"><%= render '/ps_admin/order/partials/actual_status_buttons' %></dd>
        </dl>
      </div>
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <div class="box box-info box-solid">
      <div class="box-header with-border">
        <i class="fa fa-bars"></i>
        <h3 class="box-title">Lista zamówionych produktów</h3>
      </div>
      <div class="box-body">
        <%= render '/ps_admin/order/partials/order_products' %>
      </div>
    </div>
  </div>
</div>
