inital commit
This commit is contained in:
39
app/templates/base.html
Normal file
39
app/templates/base.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{% if title %}
|
||||
<title> {{ title }} - Baroness </title>
|
||||
{% else %}
|
||||
<title> Des Bierbarons Helferin - Baroness </title>
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Menu -->
|
||||
<ul>
|
||||
<li><a href="/index">Home</a></li>
|
||||
{% if user %}
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
<li><a href="/consume"> Konsumieren</a></li>
|
||||
<li><a href="/personal">Personal</a></li>
|
||||
{% if user.isbaron %}
|
||||
<li><a href="/billing">Billing</a></li>
|
||||
<li><a href="/manage_beverages">Konsumatverwaltung</a></li>
|
||||
<li><a href="/manage_users">Konsumentenverwaltung</a></li>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li><a href="/login">Login</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if user %}
|
||||
Du bist eingeloggt als {{user.longname}}.
|
||||
{% endif %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
10
app/templates/billing.html
Normal file
10
app/templates/billing.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Konsumatverwaltung" %}
|
||||
{% block content %}
|
||||
<h3>TODO: </h3>
|
||||
<ul>
|
||||
<li>everything</li>
|
||||
</ul>
|
||||
<h1>Abrechnung</h1>
|
||||
|
||||
{% endblock %}
|
||||
18
app/templates/consume.html
Normal file
18
app/templates/consume.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% 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>
|
||||
{% endif %}
|
||||
<p>
|
||||
Möchtest du etwas konsumieren?
|
||||
{% for product in products %}
|
||||
<div><p> {{ product.id }}, <a href="/consume?prodid={{product.id}}"> {{product.name}} </a>, {{product.price}} € </p> </div>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
27
app/templates/index.html
Normal file
27
app/templates/index.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Bierliste" %}
|
||||
{% block content %}
|
||||
<h3>TODO: </h3>
|
||||
<ul>
|
||||
<li> graphical beer list</li>
|
||||
</ul>
|
||||
<h1> Bierliste </h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Produkt Nummer</th>
|
||||
<th>Konsument</th>
|
||||
<th>Preis</th>
|
||||
<th>Zeit</th>
|
||||
</tr>
|
||||
{% for consumption in consumed %}
|
||||
<tr>
|
||||
<td>{{consumption.id}}</td>
|
||||
<td>{{consumption.prodnr}}</td>
|
||||
<td>{{consumption.consumer}}</td>
|
||||
<td>{{consumption.price}}</td>
|
||||
<td>{{consumption.time}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
17
app/templates/login.html
Normal file
17
app/templates/login.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Login" %}
|
||||
{% block content %}
|
||||
<h3>TODO: </h3>
|
||||
<ul>
|
||||
<li>encrypt and salt passwords</li>
|
||||
</ul>
|
||||
<h1> Login </h1>
|
||||
{% if error %}
|
||||
<p>{{ error }}</p>
|
||||
{% endif %}
|
||||
<form name="login" method="post" action="/login">
|
||||
Username:<input type="text" name=username required placeholder="Username"><br>
|
||||
Passwort:<input type="password" name=password required placeholder="Password"><br>
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
{% endblock %}
|
||||
14
app/templates/manage_beverages.html
Normal file
14
app/templates/manage_beverages.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Konsumatverwaltung" %}
|
||||
{% block content %}
|
||||
<h3>TODO: </h3>
|
||||
<ul>
|
||||
<li>add "change products pages"</li>
|
||||
</ul>
|
||||
<h1> Konsumatverwaltung </h1>
|
||||
|
||||
{% for product in products %}
|
||||
<div><p> {{ product.id }}, {{product.name}}, {{product.price}} €</p></div>
|
||||
{% endfor %}
|
||||
<a href=/manage_beverages/add>Getränk Hinzufügen</a></li>
|
||||
{% endblock %}
|
||||
16
app/templates/manage_products_add.html
Normal file
16
app/templates/manage_products_add.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Produkt hinzufügen" %}
|
||||
{% block content %}
|
||||
<h1> Produkt hinzufügen</h1>
|
||||
{% if error %}
|
||||
<p>Fehler: {{ error }}</p>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<p>{{ success }}</p>
|
||||
{% endif %}
|
||||
<p> TODO: many </p>
|
||||
<form name="user" method="post" action="/manage_users/add">
|
||||
Produktname:<input type="text" name=username required placeholder="Username"><br>
|
||||
Preis:<input type="password" name=password1 required placeholder="Password"><br>
|
||||
</form>
|
||||
{% endblock %}
|
||||
34
app/templates/manage_users.html
Normal file
34
app/templates/manage_users.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Konsumentenverwaltung" %}
|
||||
{% block content %}
|
||||
<h1> Konsumentenverwaltung </h1>
|
||||
<p> TODO: many</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Username</th>
|
||||
<th>Name</th>
|
||||
<th>E-mail</th>
|
||||
<th>RFID-ID</th>
|
||||
<th>Geschwärzt</th>
|
||||
<th>Baron</th>
|
||||
<th>Angezeigt</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{user.id}}</td>
|
||||
<td>{{user.name}}</td>
|
||||
<td>{{user.longname}}</td>
|
||||
<td>{{user.email}}</td>
|
||||
<td>{{user.rfid_id}}</td>
|
||||
<td>{% if user.isblack %} ☑ {% else %} ☐ {% endif %} </td>
|
||||
<td>{% if user.isbaron %} ☑ {% else %} ☐ {% endif %} </td>
|
||||
<td>{% if user.isshown %} ☑ {% else %} ☐ {% endif %} </td>
|
||||
<td> <a href="/manage_users/edit/{{user.name}}">bearbeiten</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<br />
|
||||
<a href=/manage_users/add>User Hinzufügen</a>
|
||||
{% endblock %}
|
||||
21
app/templates/manage_users_add.html
Normal file
21
app/templates/manage_users_add.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Konsumentin hinzufügen" %}
|
||||
{% block content %}
|
||||
<h1> Konsumentin hinzufügen</h1>
|
||||
{% if error %}
|
||||
<p>Fehler: {{ error }}</p>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<p>{{ success }}</p>
|
||||
{% endif %}
|
||||
<p> TODO: many </p>
|
||||
<form name="user" method="post" action="/manage_users/add">
|
||||
Username:<input type="text" name=username required placeholder="Username"><br>
|
||||
Passwort:<input type="password" name=password1 required placeholder="Password"><br>
|
||||
Passwort wiederholen:<input type="password" name=password2 required placeholder="Password"><br>
|
||||
Name:<input type="text" name=longname required placeholder="Vorname Nachname"><br>
|
||||
Email:<input type="email" name=email required placeholder="petra@fet.at"><br>
|
||||
Euml ID:<input type="text" name=rfid_id required placeholder="0xDEADBEEF"><br>
|
||||
<input type="submit" value="Hinzufügen">
|
||||
</form>
|
||||
{% endblock %}
|
||||
23
app/templates/manage_users_edit.html
Normal file
23
app/templates/manage_users_edit.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Konsumentin bearbeiten" %}
|
||||
{% block content %}
|
||||
<h1> {{user.name}} bearbeiten</h1>
|
||||
{% if error %}
|
||||
<p>Fehler: {{ error }}</p>
|
||||
{% else %}
|
||||
{% if success %}
|
||||
<p>{{ success }}</p>
|
||||
{% endif %}
|
||||
<form name="user" method="post" action="/manage_users/edit">
|
||||
Userid: <input type="text" name="id" required value="{{user_to_edit.id}}" readonly="readonly" /> <br>
|
||||
Username:<input type="text" name="username" required value="{{user_to_edit.name}}" /> <br>
|
||||
Name:<input type="text" name="longname" required value="{{user_to_edit.longname}}" /><br>
|
||||
Email:<input type="email" name="email" required value="{{user_to_edit.email}}" /><br>
|
||||
Euml ID:<input type="text" name="rfid_id" required value="{{user_to_edit.rfid_id}}" /><br>
|
||||
Geschwärzt: <input type="checkbox" name="isblack" {% if user_to_edit.isblack %} checked {% endif %} /> <br>
|
||||
Baron: <input type="checkbox" name="isbaron" {% if user_to_edit.isbaron %} checked {% endif %} /> <br>
|
||||
Angezeigt: <input type="checkbox" name="isshown" {% if user_to_edit.isshown %} checked {% endif %} /><br>
|
||||
<input type="submit" value="Übernehmen" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
6
app/templates/not_baron.html
Normal file
6
app/templates/not_baron.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Fehler 401" %}
|
||||
{% block content %}
|
||||
<h1> Fehler 401 </h1>
|
||||
<p>Du musst Baron sein um auf diese Seite zugreifen zu könnnen.</p>
|
||||
{% endblock %}
|
||||
6
app/templates/not_logged_in.html
Normal file
6
app/templates/not_logged_in.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends "base.html"%}
|
||||
{% set title = "Fehler 401" %}
|
||||
{% block content %}
|
||||
<h1> Fehler 401 </h1>
|
||||
<p>Du musst eingeloggt sein um auf diese Seite zugerreifen zu können.</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user