{% extends "shop/base.html" %}
{% load mezzanine_tags shop_tags i18n future %}

{% block meta_title %}{% trans "Your Wishlist" %}{% endblock %}
{% block title %}{% trans "Your Wishlist" %}{% endblock %}

{% block breadcrumb_menu %}
{{ block.super }}
<li>{% trans "Your Wishlist" %}</li>
{% endblock %}

{% block main %}
{% if error %}{{ error }}{% endif %}
{% if request.wishlist %}
<table class="table table-striped wishlist">
	{% for item in wishlist_items %}
	<tr>
	<td>
		{% if item.image %}
		<a href="{{ item.get_absolute_url }}"><img alt="{{ item }}" src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}"></a>
		{% endif %}
		<a href="{{ item.get_absolute_url }}">{{ item }}</a>
	</td>
	<td>
		<form method="post">
			{{ item.unit_price|currency }}
            {% csrf_token %}
			<input type="hidden" name="sku" value="{{ item.sku }}">
			<input type="hidden" name="quantity" value="1">
			<input type="submit" class="btn btn-primary" name="add_cart" value="{% trans "Buy" %}">
			<input type="submit" class="btn" name="remove_wishlist" value="{% trans "Remove" %}">
		</form>
	</td>
	</tr>
	{% endfor %}
</table>
{% else %}
<p>{% trans "Your wishlist is empty." %}</p>
<br>
<p><a class="btn btn-large btn-primary" href="{% url "page" "shop" %}">{% trans "Continue Shopping" %}</a></p>
{% endif %}
{% endblock %}
