{% extends "base.html" %} {% block header %} {# Show the username. #}

Welcome, {{ authuser.name }}

{{ super() }} {% endblock %} {% block overlay %} {% if lastaction is not none %} {% if lastaction == 'buy' %} {% elif lastaction == 'deposit' %} {% endif %} {% endif %} {% endblock %} {% block main %} {# Show the users current balance #} Your balance: {{ authuser.balance|chf }}
{# Logout link #}
Logout
{# Links to deposit two common amounts of cash. TODO: Will be replaced by a nicer UI later (#20) #}
Deposit CHF 1
Deposit CHF 10
0.00
{% for i in [('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8'), ('9', '9'), ('del', '✗'), ('0', '0'), ('ok', '✓')] %}
{{ i.1 }}
{% endfor %}
    {% for user in (users if user != authuser) %}
  • {{ user.name }}
  • {% endfor %}

{% for product in products %} {# Show an item per product, consisting of the name, image, price and stock, triggering a purchase on click #}
{% if product.custom_price %} {% else %} {% endif %} {{ product.name }} {% if product.custom_price %} Custom Price
{% else %} Price: {% if authuser.is_member %} {{ product.price_member|chf }} {% else %} {{ product.price_non_member|chf }} {% endif %}
{% endif %}
Picture of {{ product.name }} {% set pstock = stock.get_stock(product) %} {% if pstock is not none %} {{ pstock }} {% endif %}
{% endfor %}
{{ super() }} {% endblock %}