matemat/templates/productlist.html

36 lines
887 B
HTML

{% extends "base.html" %}
{% block header %}
<h1>Welcome, {{ user.name }}</h1>
{{ super() }}
{% endblock %}
{% block main %}
Your balance: {{ user.balance }}
<a href="/deposit?n=100">Deposit CHF 1</a>
<a href="/deposit?n=1000">Deposit CHF 10</a>
{% for product in products %}
<div class="thumblist-item">
<a href="/buy?pid={{ product.id }}">
<span class="thumblist-title">{{ product.name }}</span>
<span class="thumblist-detail">Price:
{% if user.is_member %}
{{ product.price_member }}
{% else %}
{{ product.price_non_member }}
{% endif %}
; Stock: {{ product.stock }}</span><br/>
<img height="150" src="/img/thumbnails/products/{{ product.id }}.png" alt="Picture of {{ product.name }}" />
</a>
</div>
{% endfor %}
<a href="/logout">Logout</a>
{{ super() }}
{% endblock %}