You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.5 KiB
81 lines
2.5 KiB
{% load staticfiles %} |
|
{% load url from future %} |
|
|
|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
{% block head %} |
|
<meta charset="utf-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
|
<title>Kassensystem</title> |
|
|
|
<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" /> |
|
<link href="/static/style.css" rel="stylesheet" /> |
|
|
|
{% endblock %} |
|
</head> |
|
<body> |
|
<div class="container"> |
|
<div class="navbar navbar-default"> |
|
<div class="navbar-header"> |
|
<a class="navbar-brand" href="{% url 'overview' %}">Kassensystem</a> |
|
</div> |
|
|
|
<ul class="nav navbar-nav"> |
|
<li><a href="{% url 'overview' %}">Home</a></li> |
|
<li><a href="{% url 'products' %}">Kaufen</a></li> |
|
<li><a href="{% url 'transactions' %}">Kontoauszug</a></li> |
|
<li><a href="{% url 'usersettings' %}">Einstellungen</a></li> |
|
{% if user.is_staff %} |
|
<li><a href="/admin/">Administration</a></li> |
|
{% endif %} |
|
</ul> |
|
|
|
<ul class="nav navbar-nav navbar-right"> |
|
<li><a href="{% url 'django.contrib.auth.views.logout_then_login' %}">Logout</a></li> |
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
<div class="container"> |
|
<div class="row"> |
|
<div class="col-md-8 col-md-offset-2"> |
|
<div class="container"> |
|
{% block content %} |
|
|
|
<h1>Übersicht</h1> |
|
|
|
<strong>Herzlich willkommen, {{ user.first_name }}!</strong> |
|
|
|
<table> |
|
<tr><th>Username:</th><td>{{ user.username }}</td></tr> |
|
<tr><th>Realer Name:</th><td>{{ user.first_name }} {{ user.last_name }}</td></tr> |
|
<tr><th>Ausweis-Nr.:</th><td>{{ user.account.card_number }}</td></tr> |
|
<tr><th>Guthaben:</th><td{% if user.account.credit < 0 %} style="color: red"{% endif %}>{{ user.account.credit|floatformat:2 }} €</td></tr> |
|
<tr><th>Betrag bis Schuldenlimit:</th><td>{{ user.account.credit|add:"35"|floatformat:2 }} €</td></tr> |
|
</table> |
|
{% endblock %} |
|
</div> |
|
</div> |
|
|
|
<div class="col-md-2 well"> |
|
<span>Username:</span> |
|
<span><strong>{{ user.username }}</strong></span><br/> |
|
<span>Guthaben:</span> |
|
<span {% if user.account.credit < 0 %} style="color: red"{% endif %}><b>{{ user.account.credit|floatformat:2 }} €</b></span><br/> |
|
{% if user.account.credit|add:"35" < 5 %} |
|
<span style="color: #FF5252">Achtung!<br/> Nur noch {{ user.account.credit|add:"35"|floatformat:2 }} € bis zum Schuldenlimit.</span> |
|
{% endif %} |
|
</div> |
|
</div> |
|
</div> |
|
|
|
</div> |
|
|
|
|
|
</body> |
|
</html> |
|
|
|
|
|
|