- added product photos, some stuff on personal page
This commit is contained in:
@@ -1,24 +1,32 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Konsumieren" %}
|
||||
{% block content %}
|
||||
<h3>TODO: </h3>
|
||||
<ul>
|
||||
<li>add photos for products, add photos in database</li>
|
||||
</ul>
|
||||
<h1> Konsumieren </h1>
|
||||
{% if message %}
|
||||
<p> {{ message }} </p>
|
||||
<div class="loggedin"> {{ message }} </div>
|
||||
{% endif %}
|
||||
<p>
|
||||
<div>
|
||||
{% if user.isblack %}
|
||||
Sorry, du bist geschwärzt!
|
||||
{% else %}
|
||||
Möchtest du etwas konsumieren?
|
||||
<h2>Möchtest du etwas konsumieren?</h2>
|
||||
{% for product in products %}
|
||||
{% if product.isshown %}
|
||||
<div><p> {{ product.id }}, <a href="/consume?prodid={{product.id}}"> {{product.name}} </a>, {{"%0.2f" % product.price}} € </p> </div>
|
||||
<a href="/consume?prodid={{product.id}}">
|
||||
<div class="product">
|
||||
<!-- Produkt {{ product.id }} <br>-->
|
||||
<div class="center">
|
||||
<h2>{{product.name}}</h2>
|
||||
{% set fils = "product_%s.png" % product.name %}
|
||||
<img src="{{ url_for('static', filename=fils) }}" /><br>
|
||||
</div>
|
||||
<div class="right">
|
||||
{{"%0.2f" % product.price}} €
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
<ul>
|
||||
<li>generate new plots if .png missing</li>
|
||||
</ul>
|
||||
|
||||
<h1> Bierkonsum </h1>
|
||||
<img src="{{ url_for('static', filename='total.png') }}">
|
||||
{% if user %}
|
||||
{% set fils = "total%03d.png" % user.id %}
|
||||
<img src="{{ url_for('static', filename=fils) }}">
|
||||
{% endif %}
|
||||
<h1> Bierliste </h1>
|
||||
<img src="{{ url_for('static', filename='bierliste_small.png') }}">
|
||||
<!-- <table>
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
<p>{{ success }}</p>
|
||||
{% endif %}
|
||||
<p> TODO: many </p>
|
||||
<form name="user" method="post" action="/manage_beverages/add">
|
||||
<form name="user" method="post" action="/manage_beverages/add" enctype="multipart/form-data">
|
||||
Produktname:<br><input type="text" name="name" required><br>
|
||||
Preis:<br><input type="number" name="price" step="any" required value="0.0" /> € <br>
|
||||
Angezeigt: <input type="checkbox" name="isshown" checked /><br>
|
||||
Bild: <input type="file" name="file"><br>
|
||||
<input type="submit" value="Hinzufügen">
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -8,11 +8,12 @@
|
||||
{% if success %}
|
||||
<p>{{ success }}</p>
|
||||
{% endif %}
|
||||
<form name="product" method="post" action="/manage_beverages/edit">
|
||||
<form name="product" method="post" action="/manage_beverages/edit" enctype="multipart/form-data">
|
||||
ProduktID:<br><input type="text" name="id" required value="{{product_to_edit.id}}" readonly="readonly" /> <br>
|
||||
ProduktName:<br><input type="text" name="name" required value="{{product_to_edit.name}}" /> <br>
|
||||
Preis:<br><input type="number" name="price" step="any" required value="{{product_to_edit.price}}" /> € <br>
|
||||
Angezeigt: <input type="checkbox" name="isshown" {% if product_to_edit.isshown %} checked {% endif %} /><br>
|
||||
Bild: <input type="file" name="file"><br>
|
||||
<input type="submit" value="Übernehmen" />
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user