{% load history_tags %}
{% load basket_tags %}
{% load currency_filters %}
{% load thumbnail %}
{% load i18n %}
{% load staticfiles %}

<ul class="basket-mini-item unstyled">
    {% if request.basket.num_lines %}
        {% for line in request.basket.all_lines %}
            <li>
                <div class="row-fluid">
                    <div class="span3">
                        <div class="image_container">
                            {% with image=line.product.primary_image %}
                                {% thumbnail image.original "100x100" upscale=False as thumb %}
                                <a href="{{ line.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ line.product.get_title }}"></a>
                                {% endthumbnail %}
                            {% endwith %}
                        </div>
                    </div>
                    <div class="span6">
                        <h5><a href="{{ line.product.get_absolute_url }}">{{ line.description }}</a></h5>
                    </div>
                    <div class="span1 align-center"><strong>{% trans "Qty" %}</strong> {{ line.quantity }}</div>
                    <div class="span2 price_color align-right">{{ line.unit_price_excl_tax|currency:request.basket.currency }}</div>
                </div>
            </li>
        {% endfor %}
        <li class="form-actions">
            <h4 class="align-right">
                {% if request.basket.is_tax_known %}
                    <small>{% trans "Total:" %} {{ request.basket.total_incl_tax|currency:request.basket.currency }}</small> 
                {% else %}
                    <small>{% trans "Total:" %} {{ request.basket.total_excl_tax|currency:request.basket.currency }}</small> 
                {% endif %}
            </h4>
            <p class="pull-left"><a href="{% url 'basket:summary' %}" class="btn btn-info btn-small">{% trans "View basket" %}</a></p>
            <p class="pull-right"><a href="{% url 'checkout:index' %}" class="btn btn-primary btn-small"><i class="icon-shopping-cart"></i> {% trans "Checkout" %}</a></p>
        </li>
    {% else %}
        <li><p>{% trans "Your basket is empty." %}</p></li>
    {% endif %}
</ul>
