Frederic
11 years ago
9 changed files with 160 additions and 371 deletions
@ -0,0 +1,40 @@
@@ -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 @@
@@ -1,132 +1,81 @@
|
||||
{% load staticfiles %} |
||||
{% load url from future %} |
||||
|
||||
<?xml version="1.0" encoding="utf8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
||||
<head> |
||||
<link rel="stylesheet" href="{% static "style.css" %}"/> |
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> |
||||
|
||||
<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 %} |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
{% block head %} |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
|
||||
<div id="outbox"> |
||||
<title>Kassensystem</title> |
||||
|
||||
<div id="top"></div> |
||||
<div id="header"> |
||||
<img src="{% static "images/cash-register-64x64.png" %}" alt="kasse" /> <span style="font-size: 50px;">Kassensystem</span> |
||||
</div> |
||||
<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" /> |
||||
<link href="/static/style.css" rel="stylesheet" /> |
||||
|
||||
<div id="topmenu" onclick="javascript: bbb();"> |
||||
<!--<a href="#">Home</a> <a href="#">Einstellungen</a> <a href="#">Logout</a>--> |
||||
<ul class="topmenu"> |
||||
{% if user.is_authenticated %} |
||||
<li class="topmenu"><a href="/">Home</a></li> |
||||
<li class="topmenu"><a href="{% url 'usersettings' %}">Einstellungen</a></li> |
||||
<li class="topmenu"><a href="{% url 'django.contrib.auth.views.logout_then_login' %}">Logout</a></li> |
||||
{% else %} |
||||
<li class="topmenu"><a href="{% url 'django.contrib.auth.views.login' %}">Login</a></li> |
||||
{% endif %} |
||||
</ul> |
||||
</div> |
||||
{% 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> |
||||
|
||||
<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 id="infoboxleft"> |
||||
<span class="small-gray">Username:</span><br/> |
||||
<span class="big"><b>{{ user.username }}</b></span><br/><br/> |
||||
<span class="small-gray">Guthaben:</span><br/> |
||||
<span class="big" id="credit"{% 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 class="small-gray" style="color: #FF5252">Achtung! Nur noch {{ user.account.credit|add:"35"|floatformat:2 }} € bis zum Schuldenlimit.</span> |
||||
</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> |
||||
|
||||
<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 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 id="foot">cashonly v0815</div> |
||||
|
||||
</div> |
||||
|
||||
</body> |
||||
</html> |
||||
|
||||
|
||||
|
@ -1,21 +1,37 @@
@@ -1,21 +1,37 @@
|
||||
{% extends "cash/base.html" %} |
||||
{% load url from future %} |
||||
<!DOCTYPE html> |
||||
<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 %} |
||||
<p>Your username and password didn't match. Please try again.</p> |
||||
{% endif %} |
||||
<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="/static/signin.css" rel="stylesheet"> |
||||
|
||||
<form method="post" action="{% url 'django.contrib.auth.views.login' %}"> |
||||
{% csrf_token %} |
||||
<label>{{ form.username.label_tag }}:<br/> |
||||
{{ form.username }}</label><br/> |
||||
<label>{{ form.password.label_tag }}:<br/> |
||||
{{ form.password }}</label><br/> |
||||
</head> |
||||
|
||||
<input type="submit" value="login" /> |
||||
<input type="hidden" name="next" value="{{ next }}" /> |
||||
</form> |
||||
<body> |
||||
|
||||
{% 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