Frederic
11 years ago
9 changed files with 160 additions and 371 deletions
@ -0,0 +1,40 @@ |
|||||||
|
body { |
||||||
|
padding-top: 40px; |
||||||
|
padding-bottom: 40px; |
||||||
|
background-color: #eee; |
||||||
|
} |
||||||
|
|
||||||
|
.form-signin { |
||||||
|
max-width: 330px; |
||||||
|
padding: 15px; |
||||||
|
margin: 0 auto; |
||||||
|
} |
||||||
|
.form-signin .form-signin-heading, |
||||||
|
.form-signin .checkbox { |
||||||
|
margin-bottom: 10px; |
||||||
|
} |
||||||
|
.form-signin .checkbox { |
||||||
|
font-weight: normal; |
||||||
|
} |
||||||
|
.form-signin .form-control { |
||||||
|
position: relative; |
||||||
|
font-size: 16px; |
||||||
|
height: auto; |
||||||
|
padding: 10px; |
||||||
|
-webkit-box-sizing: border-box; |
||||||
|
-moz-box-sizing: border-box; |
||||||
|
box-sizing: border-box; |
||||||
|
} |
||||||
|
.form-signin .form-control:focus { |
||||||
|
z-index: 2; |
||||||
|
} |
||||||
|
.form-signin input[type="text"] { |
||||||
|
margin-bottom: -1px; |
||||||
|
border-bottom-left-radius: 0; |
||||||
|
border-bottom-right-radius: 0; |
||||||
|
} |
||||||
|
.form-signin input[type="password"] { |
||||||
|
margin-bottom: 10px; |
||||||
|
border-top-left-radius: 0; |
||||||
|
border-top-right-radius: 0; |
||||||
|
} |
@ -1,132 +1,81 @@ |
|||||||
{% load staticfiles %} |
{% load staticfiles %} |
||||||
{% load url from future %} |
{% load url from future %} |
||||||
|
|
||||||
<?xml version="1.0" encoding="utf8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
<!DOCTYPE html> |
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
<html lang="en"> |
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
<head> |
||||||
<head> |
{% block head %} |
||||||
<link rel="stylesheet" href="{% static "style.css" %}"/> |
<meta charset="utf-8"> |
||||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||||
|
|
||||||
<script type="text/javascript"> |
|
||||||
function toggle_visible(id) |
|
||||||
{ |
|
||||||
var elem = document.getElementById(id); |
|
||||||
if(elem.style.display != 'none') |
|
||||||
{ |
|
||||||
elem.style.display = 'none'; |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
elem.style.display = 'inline'; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
|
|
||||||
<script type="text/javascript"> |
|
||||||
function calculate_sum() { |
|
||||||
products = new Array(); |
|
||||||
//var p = {'id': {$items[item].id}, 'price': {$items[item].price}}; |
|
||||||
products.push(p); |
|
||||||
|
|
||||||
sum = 0.0; |
|
||||||
for(var i = 0; i < products.length; i++){ |
|
||||||
id = "item_"+products[i].id; |
|
||||||
count = document.getElementById(id).value; |
|
||||||
sum = sum + products[i].price*count; |
|
||||||
} |
|
||||||
document.getElementById('sum').innerHTML = sum.toFixed(2); |
|
||||||
function modifyValue(id, n) { |
|
||||||
var elem = document.getElementById(id); |
|
||||||
var newval = parseInt(elem.value) + n; |
|
||||||
if((newval >= 0) && (newval < 100)) |
|
||||||
elem.value = newval; |
|
||||||
} |
|
||||||
</script> |
|
||||||
|
|
||||||
<title>Kassensystem - LUG Saar</title> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
|
|
||||||
{% if debug %} |
|
||||||
<div style="position: absolute; top: 110px; right: 43%; color: #ff0000; font-size: 36px; font-weight: bold;"> |
|
||||||
DEVELOPMENT |
|
||||||
</div> |
|
||||||
{% endif %} |
|
||||||
|
|
||||||
<div id="outbox"> |
<title>Kassensystem</title> |
||||||
|
|
||||||
<div id="top"></div> |
<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" /> |
||||||
<div id="header"> |
<link href="/static/style.css" rel="stylesheet" /> |
||||||
<img src="{% static "images/cash-register-64x64.png" %}" alt="kasse" /> <span style="font-size: 50px;">Kassensystem</span> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div id="topmenu" onclick="javascript: bbb();"> |
{% endblock %} |
||||||
<!--<a href="#">Home</a> <a href="#">Einstellungen</a> <a href="#">Logout</a>--> |
</head> |
||||||
<ul class="topmenu"> |
<body> |
||||||
{% if user.is_authenticated %} |
<div class="container"> |
||||||
<li class="topmenu"><a href="/">Home</a></li> |
<div class="navbar navbar-default"> |
||||||
<li class="topmenu"><a href="{% url 'usersettings' %}">Einstellungen</a></li> |
<div class="navbar-header"> |
||||||
<li class="topmenu"><a href="{% url 'django.contrib.auth.views.logout_then_login' %}">Logout</a></li> |
<a class="navbar-brand" href="{% url 'overview' %}">Kassensystem</a> |
||||||
{% else %} |
</div> |
||||||
<li class="topmenu"><a href="{% url 'django.contrib.auth.views.login' %}">Login</a></li> |
|
||||||
{% endif %} |
|
||||||
</ul> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div id="topclear"></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> |
||||||
|
|
||||||
<div id="content_bg"> |
<ul class="nav navbar-nav navbar-right"> |
||||||
|
<li><a href="{% url 'django.contrib.auth.views.logout_then_login' %}">Logout</a></li> |
||||||
|
</ul> |
||||||
|
|
||||||
<div id="leftmenu"> |
|
||||||
|
|
||||||
{% if user.is_authenticated and user.account %} |
</div> |
||||||
<div id="infoboxleft"> |
|
||||||
<span class="small-gray">Username:</span><br/> |
<div class="container"> |
||||||
<span class="big"><b>{{ user.username }}</b></span><br/><br/> |
<div class="row"> |
||||||
<span class="small-gray">Guthaben:</span><br/> |
<div class="col-md-8 col-md-offset-2"> |
||||||
<span class="big" id="credit"{% if user.account.credit < 0 %} style="color: red"{% endif %}><b>{{ user.account.credit|floatformat:2 }} €</b></span><br/> |
<div class="container"> |
||||||
{% if user.account.credit|add:"35" < 5 %} |
{% block content %} |
||||||
<span class="small-gray" style="color: #FF5252">Achtung! Nur noch {{ user.account.credit|add:"35"|floatformat:2 }} € bis zum Schuldenlimit.</span> |
|
||||||
|
<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 %} |
{% endif %} |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<span class="small-gray">Funktionen</span><br/> |
|
||||||
<div class="menulink"><a class="menulink" href="/">Übersicht</a></div> |
|
||||||
<div class="menulink"><a class="menulink" href="{% url 'products' %}">Kaufen</a></div> |
|
||||||
<div class="menulink"><a class="menulink" href="{% url 'transactions' %}">Kontoauszug</a></div> |
|
||||||
{% if user.is_staff %} |
|
||||||
<span class="small-gray">Administration</span><br/> |
|
||||||
<div class="menulink"><a class="menulink" href="/admin/">Administration</a></div> |
|
||||||
{% endif %} |
|
||||||
{% else %} |
|
||||||
Einloggen um Menüfunktionen zu benutzen. |
|
||||||
{% endif %} |
|
||||||
|
|
||||||
</div> |
</div> |
||||||
<div id="content"> |
|
||||||
{% block content %} |
|
||||||
|
|
||||||
<h1>Konto - Übersicht</h1> |
|
||||||
|
|
||||||
<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 id="contentclear"></div> |
|
||||||
</div> |
</div> |
||||||
</div> |
|
||||||
|
|
||||||
<div id="foot">cashonly v0815</div> |
|
||||||
|
|
||||||
</div> |
|
||||||
|
|
||||||
</body> |
</body> |
||||||
</html> |
</html> |
||||||
|
|
||||||
|
|
||||||
|
@ -1,21 +1,37 @@ |
|||||||
{% extends "cash/base.html" %} |
<!DOCTYPE html> |
||||||
{% load url from future %} |
<html lang="en"> |
||||||
|
<head> |
||||||
|
<meta charset="utf-8"> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||||
|
|
||||||
{% block content %} |
<title>Kassensystem</title> |
||||||
|
|
||||||
{% if form.errors %} |
<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet"> |
||||||
<p>Your username and password didn't match. Please try again.</p> |
<link href="/static/signin.css" rel="stylesheet"> |
||||||
{% endif %} |
|
||||||
|
|
||||||
<form method="post" action="{% url 'django.contrib.auth.views.login' %}"> |
</head> |
||||||
{% csrf_token %} |
|
||||||
<label>{{ form.username.label_tag }}:<br/> |
|
||||||
{{ form.username }}</label><br/> |
|
||||||
<label>{{ form.password.label_tag }}:<br/> |
|
||||||
{{ form.password }}</label><br/> |
|
||||||
|
|
||||||
<input type="submit" value="login" /> |
<body> |
||||||
<input type="hidden" name="next" value="{{ next }}" /> |
|
||||||
</form> |
|
||||||
|
|
||||||
{% endblock %} |
<div class="container"> |
||||||
|
|
||||||
|
<form class="form-signin" method="post" action="{% url 'django.contrib.auth.views.login' %}"> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" value="{{ next }}" /> |
||||||
|
<h2 class="form-signin-heading">Please sign in</h2> |
||||||
|
<input type="text" name="username" class="form-control" placeholder="Username" autofocus> |
||||||
|
<input type="password" name="password" class="form-control" placeholder="Password"> |
||||||
|
<label class="checkbox"> |
||||||
|
<input type="checkbox" value="remember-me"> Remember me |
||||||
|
</label> |
||||||
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> |
||||||
|
</form> |
||||||
|
|
||||||
|
</div> <!-- /container --> |
||||||
|
|
||||||
|
|
||||||
|
<!-- Bootstrap core JavaScript |
||||||
|
================================================== --> |
||||||
|
<!-- Placed at the end of the document so the pages load faster --> |
||||||
|
</body> |
||||||
|
</html> |
||||||
|
Loading…
Reference in new issue