{% 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 %}

{% block "content" %}
	{% if allMostDrinks or allMostSnacks %}
		<table class="itemListContainer">
			<thead>
				<tr>
					<td role="presentation">&nbsp;</td>
					<th scope="column">Die beliebtesten Artikel</th>
					<th scope="column">Deine Lieblingsartikel</td>
					<th scope="column">Zuletzt hattest du</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<th scope="row">Getränke</th>
					<td>
						{% include "main/product_list.html" with buyables=allMostDrinks %}
					</td>
					<td>
						{% include "main/product_list.html" with buyables=usersMostDrinks %}
					</td>
					<td>
						{% include "main/product_list.html" with buyables=usersLastDrinks %}
					</td>
				</tr>
				<tr>
					<th scope="row">Snacks</th>
					<td>
						{% include "main/product_list.html" with buyables=allMostSnacks %}
					</td>
					<td>
						{% include "main/product_list.html" with buyables=usersMostSnacks %}
					</td>
					<td>
						{% include "main/product_list.html" with buyables=usersLastSnacks %}
					</td>
				</tr>
			</tbody>
		</table>
	{% else %}
		{{ error }}
		Es hat scheinbar noch niemand etwas gekauft. <a href="/store/">Sei der Erste!</a>
	{% endif %}
{% endblock %}
