{% extends "checkout/partials/totals_block.html" %}
{% load i18n currency_filters thumbnail delivery_time ocyanjson extra_purchase_info_tags %}
{% load shipping_tags %}

{% block panel_body %}
    {% ocyanjson "oscar" "show_tax_everywhere" False as show_tax %}
    <ul class="order-totals-panel">
    {% for line in order.lines.all %}
      {% block basketline %}
      <li class="basket-line row">
        <div class="product-image col-xs-3">
          {% with image=line.product.primary_image %}
          {% thumbnail image.original "60" upscale=True as thumb %}
          <a href="{{ line.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ line.product.get_title }}"></a>
          {% endthumbnail %}
        </div>
        <div class="product-specification col-xs-9">
          <div class="item-description col-xs-12">
              {% endwith %}
              <p><strong><a href="{{ line.product.get_absolute_url }}">{{ line.description }}</a></strong></p>
          </div>
          <div class="specification col-xs-8">
              <p>
                <span class="quantity align-center"><strong>{% trans "Qty" %}</strong> {{ line.quantity }}<br/></span>
            </p>
          </div>
          <div class="total col-xs-4">
              <p>
                <span class="price_color align-right">{{ line.line_price_incl_tax|currency:order.currency }}</span>{% if show_tax %}
                {% with line.line_price_excl_tax|currency:order.currency as price_excl_tax %}
                <small>{% blocktrans %}Excl. tax {{ price_excl_tax }}{% endblocktrans %}</small>
                {% endwith %}{% endif %}
              </p>
          </div>
        </div>
      </li>
      {% endblock %}
    {% endfor %}
    {% delivery_time basket as deliverytime %}{% if deliverytime %}
    <li class="basket-line row">
        <div id="basket_totals" class="w-100">
            <div class="delivery_time">
                <i class="fa fa-info-circle"></i>
                <div class="time_wrapper">
                {{ deliverytime|safe }}
                </div>
            </div>
        </div>
    </li>{% endif %}
    <li class="basket-line row">
      {% include "oscar/basket/partials/basket_totals.html" with basket=order %}
    </li>
    </ul>
{% endblock %}
