{% extends "base.html" %}

{% comment %}
# This file is part of k4ever, a point-of-sale system
#   Contact............  <k4ever@lists.someserver.de>
#   Website............  http://k4ever.someserver.de/
#   Bug tracker........  http://k4ever.someserver.de/report
#
# Licensed under GNU Affero General Public License v3 or later
{% endcomment %}

{% load thumbnail %}


{% block "content" %}
	<a class="button" href="/store/">Zur Liste aller Items</a>
	{% if item %}
		<div class="singleItem" >
			<div class="productImage">
				<img src="{% thumbnail item.image 400x400 %}">
			</div>
			<div class="productMeta">
				<div>
					<h2>{{ item.name }}</h2>

					<h3>Kaufen</h3>
					<div class="actions clearAfter" data-image="{% thumbnail item.image 48x48 %}" data-name="{{ item.name }}" data-id="{{ item.id }}">
						<a class="button buy" href="/store/buy/{{ item.id }}/">
							<span><span>{{ item.price|floatformat:2 }}€</span></span>
						</a>

						{% if item.hasDeposit %}
						<a class="button buy inclDeposit" href="/store/buy/{{ item.id }}/with/deposit/">
							<span><span>{{ item.price|floatformat:2 }}€ / {{ item.deposit|floatformat:2 }}€</span></span>
						</a>

						<a class="button buy onlyDeposit"
							href="/store/buy/{{ item.id }}/only/deposit/">
							<span><span>{{ item.deposit|floatformat:2 }}€</span></span>
						</a>
						{% endif %}
					</div>

					<h3>Beschreibung</h3>
					<div class="description">"{{ item.description }}"</div>

					<h3>Kategorie{{ item.buyableType.all.count|pluralize:"n"}}</h3>
					<ul>
						{% for type in item.buyableType.all %}
							<li>{{ type }}</li>
						{% endfor %}
					</ul>
				</div>
			</div>
		</div>
	{% else %}
		Produkt wurde nicht gefunden
	{% endif %}
{% endblock %}
