template refactoring the first. fixes #6, #84, 75

master
Konrad Mohrfeldt 12 years ago
parent 771d5db9ec
commit 8c276644f5

1
.gitignore vendored

@ -10,3 +10,4 @@ k4ever/media/img/
k4ever/settings.py k4ever/settings.py
*.kdev4 *.kdev4
.kdev4 .kdev4
*.kate-swp

@ -14,97 +14,59 @@
{% block "content" %} {% block "content" %}
{% if history %} {% if history %}
<div style="width:800px"> <h2>Frühere Einkäufe von {{ user }}</h2>
<h1>Fr&uuml;here Eink&auml;ufe von {{ user }}</h1>
</div> <div class="pagination pagination-right">
<div class="pagination" style="width:800px; text-align:center; margin-top:25px"> <ul>
<table width="100%"> {% for page in history.paginator.page_range %}
<tr> <li class="{% if history.number == page %}active{% endif %}"><a href="?page={{ page }}">{{ page }}</a></li>
<td width="33%"> {% endfor %}
{% if history.has_previous %} </ul>
<a href="?page={{ history.previous_page_number }}">Vorherige Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
<td width="34%">
<span class="current">
Seite {{ history.number }} von {{ history.paginator.num_pages }}
</span>
</td>
<td width="34%">
{% if history.has_next %}
<a href="?page={{ history.next_page_number }}">N&auml;chste Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
</tr>
</table>
</div> </div>
<table class="details">
<thead> <table class="table table-striped table-condensed">
<colgroup>
<col width="200px" />
</colgroup>
<thead class="no-border">
<tr> <tr>
<th>Buchung</th> <th>Buchung</th>
<th style="text-align:left">Einkauf</th> <th>Einkauf</th>
</tr> </tr>
</thead> </thead>
<tfoot> <tfoot>
<tr> <tr>
<th>Buchung</th> <th>Buchung</th>
<th style="text-align:left">Einkauf</th> <th>Einkauf</th>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
{% for order in history.object_list %} {% for order in history.object_list %}
<tr> <tr>
<td width="150px"> <td>{{ order.dateTime|date:"j. F Y H:i" }}</td>
{{ order.dateTime|date:"Y-m-d H:i" }} <td>
</td> <ul class="thumbnails">
<td style="text-align:left"> {% for item in order.purchase_set.all %}
<table> <li rel="tooltip" title="{% if not item.isDeposit %}{{ item.buyable.name }}{% else %}{{ item.buyable.name }} Pfand{% endif %} für {{ item.price|floatformat:2 }} €">
<tr> <div class="thumbnail">
{% for item in order.purchase_set.all %} <img src="{% thumbnail item.buyable.image 32x32 %}" width="32" height="32" alt="{{ item.buyable.name }}" />
<td width="80px"> </div>
{% if not item.isDeposit %} </li>
<img src="{% thumbnail item.buyable.image 64x64 %}" width=64 height=64> {% endfor %}
{% else %} </td>
<b>{{ item.buyable.name }} Pfand</b> </tr>
{% endif %} {% endfor %}
<br/> </tbody>
zu {{ item.price|floatformat:2 }} € </table>
</td>
{% endfor %}
</tr>
</table>
</td>
</tr>
{% endfor %}
</table>
<div class="pagination" style="width:800px; text-align:center; margin-top:25px">
<table width="100%">
<tr>
<td width="33%">
{% if history.has_previous %}
<a href="?page={{ history.previous_page_number }}">Vorherige Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
<td width="34%">
<span class="current">
Seite {{ history.number }} von {{ history.paginator.num_pages }}
</span>
</td>
<td width="34%">
{% if history.has_next %}
<a href="?page={{ history.next_page_number }}">N&auml;chste Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
</tr>
</table>
</div>
<div class="pagination pagination-right">
<ul>
{% for page in history.paginator.page_range %}
<li class="{% if history.number == page %}active{% endif %}"><a href="?page={{ page }}">{{ page }}</a></li>
{% endfor %}
</ul>
</div>
{% else %} {% else %}
{{ error }} Es scheint so, als hättest du bisher noch nichts gekauft, {{ user }}.
Es scheint so, als h&auml;ttest du bisher noch nichts gekauft, {{ user }}.
{% endif %} {% endif %}
{% endblock %} {% endblock %}

@ -13,7 +13,7 @@
{% block "content" %} {% block "content" %}
<p> <p>
{% if not error %} {% if not error %}
<h1>Danke für deinen Einkauf, {{ order.user }}.</h1> <h2>Danke für deinen Einkauf, {{ order.user }}.</h2>
Du hast soeben Du hast soeben
{% for item in order.purchase_set.all %} {% for item in order.purchase_set.all %}
{{ item }} {{ item }}

@ -10,42 +10,36 @@
{% load thumbnail %} {% load thumbnail %}
{% if buyables %} {% if buyables %}
<table class="itemList"> <div class="row-fluid">
<tbody> <ul class="thumbnails">
{% for buyable in buyables %} {% for buyable in buyables %}
<tr> <li class="span2" title="{{ buyable.name }}" rel="tooltip">
<td class="productImage"> <div class="thumbnail">
<a href="{% url buyable_show buyable.id %}"><img src="{% thumbnail buyable.image 64x64 %}"/></a> <a class="image" href="{% url buyable_show buyable.id %}">
</td> <img src="{% thumbnail buyable.image 128x128 %}" alt="{{ buyable.name }}" />
<td class="name"><a href="{% url buyable_show buyable.id %}">{{ buyable.name }}</a></td>
<td class="actions" data-image="{% thumbnail buyable.image 48x48 %}" data-name="{{ buyable.name }}" data-id="{{ buyable.id }}">
{% if buyable.hasDeposit %}
<a class="button buy" href="{% url buyable_buy buyable.id %}"
title="Kaufen (Ohne Pfand)">
<span><span>{{ buyable.price|floatformat:2 }}€</span></span>
</a> </a>
<div class="caption">
<a class="button buy inclDeposit" <h4><a href="{% url buyable_show buyable.id %}">{{ buyable.name }}</a></h4>
href="{% url buyable_buy buyable.id "with/deposit" %}" title="Kaufen (Mit Pfand)"> <div class="btn-toolbar">
<span><span>{{ buyable.price|floatformat:2 }}€ / {{ buyable.deposit|floatformat:2 }}€</span></span> <div class="btn-group" data-id="{{ buyable.id}}" data-name="{{ buyable.name }}" data-image="{% thumbnail buyable.image 48x48 %}">
</a> <a class="btn btn-success dropdown-toggle" data-toggle="dropdown" href="#">Kaufen<span class="caret"></span></a>
<ul class="dropdown-menu" style="text-align: left">
<a class="button buy onlyDeposit" {% if buyable.hasDeposit %}
href="{% url buyable_buy buyable.id "only/deposit" %}" title="Kaufen (Nur Pfand)"> <li><a class="buy" href="{% url buyable_buy buyable.id %}"><i class="icon-tag"></i> Kaufen (Ohne Pfand) - {{ buyable.price|floatformat:2 }}</a></li>
<span><span>{{ buyable.deposit|floatformat:2 }}€</span></span> <li><a class="buy inclDeposit" href="{% url buyable_buy buyable.id "with/deposit" %}"><i class="icon-tags"></i> Kaufen (Mit Pfand) - {{ buyable.price|floatformat:2 }} / {{ buyable.deposit|floatformat:2 }}</a></li>
</a> <li><a class="buy onlyDeposit" href="{% url buyable_buy buyable.id "only/deposit" %}"><i class="icon-retweet"></i> Kaufen (Nur Pfand) - {{ buyable.deposit|floatformat:2 }}</a></li>
{% else %}
{% else %} <li><a class="buy" href="{% url buyable_buy buyable.id %}"><i class="icon-tag"></i> Kaufen (Ohne Pfand) - {{ buyable.price|floatformat:2 }}</a></li>
<a class="button buy" href="{% url buyable_buy buyable.id %}" {% endif %}
title="Kaufen"> </ul>
<span><span>{{ buyable.price|floatformat:2 }}€</span></span> </div>
</a> </div>
{% endif %} </div>
</td> </div>
</tr> </li>
{% endfor %} {% endfor %}
</tbody> </ul>
</table> </div>
{% else %} {% else %}
<p>{{ default|default_if_none:"Noch keine gekauft" }}</p> <p>{{ default|default_if_none:"Noch keine gekauft" }}</p>
{% endif %} {% endif %}

@ -13,7 +13,7 @@
{% block "content" %} {% block "content" %}
<a class="button" href="/store/">Zur Liste aller Items</a> <a class="btn" href="/store/">Zur Liste aller Produkte</a>
{% if item %} {% if item %}
<div class="singleItem" > <div class="singleItem" >
<div class="productImage"> <div class="productImage">

@ -10,14 +10,20 @@
{% endcomment %} {% endcomment %}
{% block "content" %} {% block "content" %}
<div class="viewControl"> <h2>Produktübersicht</h2>
<h3>Sortieren nach</h2> <div class="btn-toolbar">
<a class="button" href="/store/">Letzte Änderung</a> <div class="btn-group">
<a class="button" href="?order=alphabet">Alphabet</a> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
<a class="button" href="?order=price">Preis</a><br/> Sortieren nach
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/store/"><i class="icon-time"></i> Letzter Änderung</a></li>
<li><a href="?order=alphabet"><i class="icon-font"></i> Alphabet</a></li>
<li><a href="?order=price"><i class="icon-shopping-cart"></i> Preis</a></li>
</ul>
</div>
</div> </div>
<div style="width:800px"> {% include "buyables/product_list.html" with buyables=items %}
{% include "buyables/product_list.html" with buyables=items %}
</div>
{% endblock %} {% endblock %}

@ -18,39 +18,27 @@
<script type="text/javascript"> <script type="text/javascript">
var MEDIA_URL = "{{ MEDIA_URL }}"; var MEDIA_URL = "{{ MEDIA_URL }}";
</script> </script>
<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery-1.5.1.js"></script> <script type='text/javascript' src="{{ MEDIA_URL }}js/jquery.min.js"></script>
<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery-ui-1.8.10.custom.min.js"></script> <script type='text/javascript' src="{{ MEDIA_URL }}js/jquery-ui-1.8.10.custom.min.js"></script>
<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery.ui.autocomplete.html.js"></script> <script type='text/javascript' src="{{ MEDIA_URL }}js/jquery.ui.autocomplete.html.js"></script>
<script type='text/javascript' src="{{ MEDIA_URL }}js/jquery.gritter.min.js"></script> <script type='text/javascript' src="{{ MEDIA_URL }}js/jquery.gritter.min.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}bootstrap/js/bootstrap.min.js"></script>
<script type='text/javascript' src="{{ MEDIA_URL }}js/k4ever.js"></script> <script type='text/javascript' src="{{ MEDIA_URL }}js/k4ever.js"></script>
{% block extrahead %}{% endblock %} {% block extrahead %}{% endblock %}
{% endblock head %} {% endblock head %}
<title>Freitagsrundenkasse{% block "title" %}{% endblock %}</title> <title>Freitagsrundenkasse{% block "title" %}{% endblock %}</title>
</head> </head>
<body{%block bodyargs %}{%endblock%}> <body{%block bodyargs %}{%endblock%}>
<div id="header"> <div class="navbar navbar-fixed-top">
<div class="search"> <div class="navbar-inner">
<div> <div class="container-fluid">
{% if user.is_authenticated %} <a class="brand" href="/">Kasse</a>
{% include "main/search-form.html" %} {% include "main/navbar-content.html" %}
{% endif %}
</div> </div>
</div> </div>
<div class="navigation">
<h1>Kasse</h1>
<nav>
{% if user.is_authenticated %}
{% include "main/navigation-login.html" %}
{% else %}
{% include "main/navigation.html" %}
{% endif %}
</nav>
{% if user.is_authenticated %}
<span class="balance">Kontostand: {{ user.get_profile.balance|floatformat:2 }} €</span>
{% endif %}
</div>
</div> </div>
<div class="content">
<div class="content container-fluid">
{% block "content" %}{% endblock %} {% block "content" %}{% endblock %}
</div> </div>
</body> </body>

@ -7,6 +7,14 @@
# Licensed under GNU Affero General Public License v3 or later # Licensed under GNU Affero General Public License v3 or later
{% endcomment %} {% endcomment %}
<input placeholder="Suche und kaufe..." class="autocomplete" {% for field in form %}
type="search" name="search_term" value="Lade Daten..." <div class="control-group {% if field.errors %}error{% endif %}">
disabled="disabled" /> {{ field.label_tag }}
<div class="controls">
{{ field }}
{% if field.errors %}
<p class="help-block">{{ field.errors }}</p>
{% endif %}
</div>
</div>
{% endfor %}

@ -0,0 +1,44 @@
{% comment %}
# This file is part of k4ever, a point-of-sale system
# Contact............ <k4ever@lists.someserver.de>
# Website............ http://k4ever.someserver.de/
# Bug tracker........ http://k4ever.someserver.de/report
#
# Licensed under GNU Affero General Public License v3 or later
{% endcomment %}
{% load navigation_extras %}
{% url transaction.views.overview as transactions %}
{% url main.views.startpage as home %}
{% url buyable.views.showItems as store %}
{% url buyable.views.history as history %}
{% url main.views.settings as settings %}
{% url django.contrib.auth.views.logout as logout %}
{% url django.contrib.auth.views.login as login %}
{% url main.views.register as register %}
<ul role="navigation sitemap" class="nav">
{% if user.is_authenticated %}
<li class="{% active request home %}"><a href="{{ home }}">Home</a></li>
<li class="{% active request store %}"><a href="{{ store }}">Einkaufen</a></li>
<li class="{% active request transactions %}"><a href="{{ transactions }}">Konto</a></li>
<li class="{% active request history %}"><a href="{{ history }}">Frühere Einkäufe</a></li>
<li class="{% active request settings %}"><a href="{{ settings }}">Einstellungen</a></li>
<li class="divider-vertical" role="presentation">
{% if user.is_staff %}
<li class=""><a href="/admin/">Administration</a></li>
{% endif %}
<li class="{% active request logout %}"><a href="{{ logout }}">Abmelden</a></li>
{% else %}
<li class="{% active request login %}"><a href="{{ login }}">Anmelden</a></li>
<li class="{% active request register %}"><a href="{{ register }}">Registrieren</a></li>
{% endif %}
</ul>
<form class="navbar-search pull-right">
<span class="brand balance">Kontostand: {{ user.get_profile.balance|floatformat:2 }} €</span>
<input placeholder="Suche und kaufe..." class="search-query autocomplete"
type="search" name="search_term" value="Lade Daten..."
disabled="disabled" />
</form>

@ -1,20 +0,0 @@
{% comment %}
# This file is part of k4ever, a point-of-sale system
# Contact............ <k4ever@lists.someserver.de>
# Website............ http://k4ever.someserver.de/
# Bug tracker........ http://k4ever.someserver.de/report
#
# Licensed under GNU Affero General Public License v3 or later
{% endcomment %}
<ul role="navigation sitemap">
<li><a href="/">Home</a></li>
<li><a href="/store/">Einkaufen</a></li>
<li><a href="/transaction/">Konto</a></li>
<li><a href="/store/history/">Frühere Einkäufe</a></li>
<li><a href="/user/settings/">Einstellungen</a></li>
{% if user.is_staff %}
<li><a href="/admin/">Administration</a></li>
{% endif %}
<li><a href="/user/logout/">Abmelden</a></li>
</ul>

@ -18,7 +18,7 @@
<a href="{% url buyable_show buyable.id %}"><img src="{% thumbnail buyable.image 64x64 %}" /></a> <a href="{% url buyable_show buyable.id %}"><img src="{% thumbnail buyable.image 64x64 %}" /></a>
</td> </td>
<td class="name"><span>{{ buyable.name }}</span> {% if buyable.num_buys %}({{ buyable.num_buys }} mal gekauft){% endif %}</td> <td class="name"><span>{{ buyable.name }}</span> {% if buyable.num_buys %}({{ buyable.num_buys }} mal gekauft){% endif %}</td>
<td class="actions" data-image="{% thumbnail buyable.image 48x48 %}" data-name="{{ buyable.name }}" data-id="{{ buyable.id }}"> <td class="actions btn-group" data-image="{% thumbnail buyable.image 48x48 %}" data-name="{{ buyable.name }}" data-id="{{ buyable.id }}">
{% if buyable.deposit > 0 %} {% if buyable.deposit > 0 %}
<a class="button buy" href="{% url buyable_buy buyable.id %}" title="Kaufen (Ohne Pfand)"><span><span>{{ buyable.price|floatformat:2 }}€</span></span></a> <a class="button buy" href="{% url buyable_buy buyable.id %}" title="Kaufen (Ohne Pfand)"><span><span>{{ buyable.price|floatformat:2 }}€</span></span></a>
<a class="button buy inclDeposit" href="{% url buyable_buy buyable.id "with/deposit" %}" title="Kaufen (Mit Pfand)"><span><span>{{ buyable.price|floatformat:2 }}€ / {{ buyable.deposit|floatformat:2 }}€</span></span></a> <a class="button buy inclDeposit" href="{% url buyable_buy buyable.id "with/deposit" %}" title="Kaufen (Mit Pfand)"><span><span>{{ buyable.price|floatformat:2 }}€ / {{ buyable.deposit|floatformat:2 }}€</span></span></a>

@ -10,84 +10,90 @@
{% endcomment %} {% endcomment %}
{% block "content" %} {% block "content" %}
<div style="width:800px"> <div class="row-fluid">
<h1>Passwort</h1> <div class="span6">
<br /> <h2>Pluginberechtigungen</h2>
{% if form %}
{% if password_success %} {% if pluginerror %}
{{ password_success }} <br /> <div class="alert alert-error">
{% endif %} <h4 class="alert-heading">{{ pluginerror|safe }}</h4>
<table> </div>
<form method="post" action="#">
{% csrf_token %}
{{ form }}
<tr><th align="center" colspan="2"><input type="submit" value="&Auml;ndern" /></th></tr>
</form>
</table>
{% else %}
Da du dich nicht &uuml;ber Django authentifizierst (sondern z.B. &uuml;ber LDAP) kannst du dein Passwort hier nicht &auml;ndern.
{% endif %}
</div>
<div style="width:800px; margin-top: 25px">
<h1>Pluginberechtigungen</h1>
{% if pluginerror %}
<font color="red">{{ pluginerror|safe }}</font>
{% endif %}
{% if pluginmsg %}
<font color="green">{{ pluginmsg|safe }}</font>
{% endif %}
<p>
<table style="border: 2px solid #BBBBBB; -moz-border-radius: 3px; -webkit-border-radius: 3px; -khtml-border-radius: 3px; border-radius: 3px">
<tr style="height: 40px">
{% if permissions %}
<th rowspan={{ permissions|length|add:"1"}} style="vertical-align:middle; text-align:center; color:#0cb31c; -moz-transform: rotate(270deg); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); -o-transform: rotate(270deg); transform: rotate(270deg)">Erlaubt</th>
{% else %}
<th>&nbsp;</th>
{% endif %} {% endif %}
<th width="100px" style="vertical-align:middle">Name</th>
<th width="100px" style="vertical-align:middle">Author</th> <table class="table table-striped">
<th style="vertical-align:middle">Beschreibung</th> <thead>
<th width="100px" style="vertical-align:middle">AuthBlob</th> <tr>
<th width="150px" style="vertical-align:middle">Erlauben/Verbieten</th> <th>Authorisiert</th>
</tr> <th>Name</th>
{% for p in permissions %} <th>Autor_in</th>
<tr> <th>Beschreibung</th>
<td style="vertical-align:middle; text-align:center">{{ p.plugin.name }}<br/>{{ p.plugin.version }}</td> <th>AuthBlob</th>
<td style="vertical-align:middle; text-align:center">{{ p.plugin.author }}</td> <th>Erlauben/Verbieten</th>
<td style="vertical-align:middle; text-align:center"><div style="margin: 5px">{{ p.plugin.descr }}</div></td> </tr>
<td style="text-align:center"> </thead>
{% if p.plugin.userCanWriteAuthblob %} <tbody>
<div style="margin:5px"> {% for p in permissions %}
<form method="post" action="/user/settings/plugin/authblob/{{ p.plugin.id }}/"> <tr>
<td style="text-align: center"><i class="icon-ok "></i></td>
<td>{{ p.plugin.name }}<br/>{{ p.plugin.version }}</td>
<td>{{ p.plugin.author }}</td>
<td>{{ p.plugin.descr }}</td>
<td>
{% if p.plugin.userCanWriteAuthblob %}
<form method="post" action="/user/settings/plugin/authblob/{{ p.plugin.id }}/">
{% csrf_token %}
<textarea name="authblob">{{ p.authblob }}</textarea>
<input type="submit" class="btn" value="Speichern">
</form>
{% else %}
{% if p.plugin.userCanReadAuthblob %}
{{ p.authblob }}
{% else %}
---
{% endif %}
{% endif %}
</td>
<td><a href="/user/settings/plugin/deny/{{ p.plugin.id }}/" class="btn btn-danger">Plugin verbieten</a></td>
</tr>
{% endfor %}
{% if unallowed %}
{% for plugin in unallowed %}
<tr>
<td></td>
<td>{{ plugin.name }}<br/>{{ plugin.version }}</td>
<td>{{ plugin.author }}</td>
<td>{{ plugin.descr }}</td>
<td></td>
<td><a class="btn btn-success" href="/user/settings/plugin/allow/{{ plugin.id }}/">Plugin erlauben</a></td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
<div class="span6">
<h2>Passwort</h2>
{% if form %}
{% if password_success %}
<div class="alert alert-success">
<h4 class="alert-heading">Passwort geändert.</h4>
</div>
{% endif %}
<form method="post" action="#" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
<textarea name="authblob">{{ p.authblob }}</textarea> {% include "form.html" with form=form %}
<input type="submit" value="Speichern">
<div class="control-group">
<div class="controls">
<input class="btn btn-primary" type="submit" value="Passwort ändern" />
</div>
</div>
</form> </form>
</div>
{% else %}
{% if p.plugin.userCanReadAuthblob %}
{{ p.authblob }}
{% else %} {% else %}
--- <p>Da du dich nicht direkt über das Kassensystem authentifizierst (sondern z.B. über LDAP) kannst du dein Passwort hier nicht ändern.</p>
{% endif %} {% endif %}
{% endif %} </div>
</td> </div>
<td style="vertical-align:middle; text-align:center"><a href="/user/settings/plugin/deny/{{ p.plugin.id }}/" class="button" style="color: #e61e1e; margin-bottom: 35px">Plugin verbieten</a></td>
</tr>
{% endfor %}
{% if unallowed %}
<tr style="border-top: 1px solid #BBBBBB">
<th rowspan={{ unallowed|length}} style="vertical-align:middle; text-align:center; color:#e61e1e; -moz-transform: rotate(270deg); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); -o-transform: rotate(270deg); transform: rotate(270deg)">Verboten</th>
{% for plugin in unallowed %}
<td style="vertical-align:middle; text-align:center">{{ plugin.name }}<br/>{{ plugin.version }}</td>
<td style="vertical-align:middle; text-align:center">{{ plugin.author }}</td>
<td style="vertical-align:middle; text-align:center"><div style="margin:5px">{{ plugin.descr }}</div></td>
<td>&nbsp;</td>
<td style="vertical-align:middle; text-align:center"><a class="button" href="/user/settings/plugin/allow/{{ plugin.id }}/" style="color: #0cb31c; margin-buttom: 35px">Plugin erlauben</a></td>
</tr>
<tr>
{% endfor %}
{% endif %}
</table>
</p>
{% endblock %} {% endblock %}

@ -1,13 +1,18 @@
{% comment %} # -*- coding: utf-8 -*-
# This file is part of k4ever, a point-of-sale system # This file is part of k4ever, a point-of-sale system
# Contact............ <k4ever@lists.someserver.de> # Contact............ <k4ever@lists.someserver.de>
# Website............ http://k4ever.someserver.de/ # Website............ http://k4ever.someserver.de/
# Bug tracker........ http://k4ever.someserver.de/report # Bug tracker........ http://k4ever.someserver.de/report
# #
# Licensed under GNU Affero General Public License v3 or later # Licensed under GNU Affero General Public License v3 or later
{% endcomment %}
<ul> from django.template import Library
<li><a href="/user/login/">Anmelden</a></li> import re
<li><a href="/user/register/">Registrieren</a></li>
</ul> register = Library()
@register.simple_tag
def active(request, pattern):
if pattern == request.path:
return "active"
return ""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -1,6 +1,8 @@
@import "fonts.css"; @import "fonts.css";
@import "jquery.gritter.css"; @import "jquery.gritter.css";
@import "../bootstrap/css/bootstrap.min.css";
/* IF IM NOT A .LESS FILE DO NOT EDIT ME, BUT EDIT THE LESS FILE INSTEAD :) /* IF IM NOT A .LESS FILE DO NOT EDIT ME, BUT EDIT THE LESS FILE INSTEAD :)
@see http://lesscss.org/ */ @see http://lesscss.org/ */
/* /*
@ -11,119 +13,20 @@
* *
* Licensed under GNU Affero General Public License v3 or later * Licensed under GNU Affero General Public License v3 or later
*/ */
/* this is a css style reset. theres much discussion if something like this
is helpful and appropriate. well... its here for now, so please dont
change anything in the following block */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
font,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
background: transparent;
border: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
}
ol, ul, li {
list-style: none;
}
a:focus, input:focus {
outline: none;
}
body {
line-height: 1;
}
blockquote {
quotes: none;
}
blockquote:before, blockquote:after {
content: '';
content: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
a img {
border: none;
}
a {
text-decoration: none;
color: inherit;
}
/* end of the css style reset block. feel free to change things */
body { body {
background: white; background: white;
font: 11px "Open Sans", Tahoma, Verdana, Arial, sans-serif; font-family: "Open Sans", Tahoma, Verdana, Arial, sans-serif;
padding-top: 60px;
}
td {
word-wrap: break-word;
} }
h1, h1,
h2, h2,
h3, h3,
h4, h4,
h5, h5,
h6, h6 {
th {
clear: both; clear: both;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
@ -148,63 +51,48 @@ h3 {
clear: both; clear: both;
display: block; display: block;
} }
a { .navbar-inner {
color: #3398cc; border-radius: 0;
} }
a:hover { .navbar-inner a.brand {
color: white; background: url("img/logo.png") 6px center no-repeat transparent;
background-color: #3398cc; padding-left: 37px;
} }
.content { .navbar-search {
padding: 5px; margin-bottom: -6px;
} }
input, select { .navbar-search span {
padding: 2px 5px; margin-top: -6px;
border: 1px solid #E5E5E5;
/* hack for webkit-based browser to hide borders */
background: url("img/404") white;
} }
input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus { ul.thumbnails div.thumbnail {
background: #FAFFBD; text-align: center;
} }
p { ul.thumbnails div.thumbnail:hover {
margin-bottom: 7px; border-color: #007bba;
} }
#header { ul.thumbnails div.thumbnail h4 a, ul.thumbnails div.thumbnail h5 a {
margin-bottom: 20px; white-space: nowrap;
position: relative; width: 100%;
z-index: 100; overflow: hidden;
text-overflow: ellipsis;
display: block;
padding: 2px 0;
} }
#header > div { .table thead.no-border th, .table thead.no-border td {
padding: 5px 10px; border-top: 0;
} }
#header .search { a {
height: 40px; color: #3398cc;
position: relative;
z-index: 2;
background-color: #111111;
background-image: -webkit-gradient(linear, left top, left bottom, from(#666666), to(#111111));
background-image: -webkit-linear-gradient(top, #666666, #111111);
background-image: -moz-linear-gradient(top, #666666, #111111);
background-image: -ms-linear-gradient(top, #666666, #111111);
background-image: -o-linear-gradient(top, #666666, #111111);
background-image: linear-gradient(top, #666666, #111111);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666', EndColorStr='#111111');
-moz-box-shadow: 0 3px 8px 0 black;
-webkit-box-shadow: 0 3px 8px 0 black;
box-shadow: 0 3px 8px 0 black;
} }
#header .search > div { a:hover {
background: url("img/logo.png") 0 center no-repeat transparent; color: white;
height: 100%; background-color: #3398cc;
} }
#header .search input { a:hover.image {
width: 300px; color: inherit;
height: 30px; background-color: inherit;
float: right;
} }
#header .search ul.ui-autocomplete { ul.ui-autocomplete {
background: white; background: white;
width: 298px; width: 298px;
border-width: 0 1px 1px 1px; border-width: 0 1px 1px 1px;
@ -212,10 +100,10 @@ p {
border-color: black; border-color: black;
z-index: 100; z-index: 100;
} }
#header .search ul.ui-autocomplete li.ui-menu-item { ul.ui-autocomplete li.ui-menu-item {
display: table-row; display: table-row;
} }
#header .search ul.ui-autocomplete li.ui-menu-item:hover, #header .search ul.ui-autocomplete li.ui-menu-item.focus { ul.ui-autocomplete li.ui-menu-item:hover, ul.ui-autocomplete li.ui-menu-item.focus {
background-image: -webkit-gradient(linear, left top, left bottom, from(#32bbef), to(#3398cc)); background-image: -webkit-gradient(linear, left top, left bottom, from(#32bbef), to(#3398cc));
background-image: -webkit-linear-gradient(top, #32bbef, #3398cc); background-image: -webkit-linear-gradient(top, #32bbef, #3398cc);
background-image: -moz-linear-gradient(top, #32bbef, #3398cc); background-image: -moz-linear-gradient(top, #32bbef, #3398cc);
@ -227,153 +115,60 @@ p {
-webkit-box-shadow: 0 0 5px #666666; -webkit-box-shadow: 0 0 5px #666666;
box-shadow: 0 0 5px #666666; box-shadow: 0 0 5px #666666;
} }
#header .search ul.ui-autocomplete li.ui-menu-item:hover a, #header .search ul.ui-autocomplete li.ui-menu-item.focus a { ul.ui-autocomplete li.ui-menu-item:hover a, ul.ui-autocomplete li.ui-menu-item.focus a {
color: white !important; color: white !important;
} }
#header .search ul.ui-autocomplete li.ui-menu-item a span { ul.ui-autocomplete li.ui-menu-item a span {
line-height: 1; line-height: 1;
vertical-align: top; vertical-align: top;
} }
#header .search ul.ui-autocomplete li.ui-menu-item a span img { ul.ui-autocomplete li.ui-menu-item a span img {
height: 50px; height: 50px;
} }
#header .search ul.ui-autocomplete li.ui-menu-item a#ui-active-menuitem.ui-corner-all div { ul.ui-autocomplete li.ui-menu-item a#ui-active-menuitem.ui-corner-all div {
color: #FF0084; color: #FF0084;
} }
#header .search ul.ui-autocomplete li.ui-menu-item a.ui-corner-all span { ul.ui-autocomplete li.ui-menu-item a.ui-corner-all span {
display: table-cell; display: table-cell;
} }
#header .search ul.ui-autocomplete .preview, #header .search ul.ui-autocomplete .buy, #header .search ul.ui-autocomplete .meta { ul.ui-autocomplete .preview, ul.ui-autocomplete .buy, ul.ui-autocomplete .meta {
height: 50px; height: 50px;
padding: 5px; padding: 5px;
font-size: 10px; font-size: 10px;
} }
#header .search ul.ui-autocomplete .preview { ul.ui-autocomplete .preview {
width: 50px; width: 50px;
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
} }
#header .search ul.ui-autocomplete .buy { ul.ui-autocomplete .buy {
vertical-align: middle; vertical-align: middle;
width: 50px; width: 50px;
} }
#header .search ul.ui-autocomplete .focus .buy { ul.ui-autocomplete .focus .buy {
background-image: url("img/alt.png"); background-image: url("img/alt.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 2px center; background-position: 2px center;
} }
#header .search ul.ui-autocomplete .focus .buy.lock { ul.ui-autocomplete .focus .buy.lock {
background-image: url("img/buy.png"); background-image: url("img/buy.png");
} }
#header .search ul.ui-autocomplete .focus .buy.lock.load, #header .search ul.ui-autocomplete .focus .buy.load { ul.ui-autocomplete .focus .buy.lock.load, ul.ui-autocomplete .focus .buy.load {
background-image: url("img/load.svg"); background-image: url("img/load.svg");
} }
#header .search ul.ui-autocomplete .focus .buy.lock.success, #header .search ul.ui-autocomplete .focus .buy.success { ul.ui-autocomplete .focus .buy.lock.success, ul.ui-autocomplete .focus .buy.success {
background-image: url("img/success.png"); background-image: url("img/success.png");
} }
#header .search ul.ui-autocomplete .focus .buy.lock.failure, #header .search ul.ui-autocomplete .focus .buy.failure { ul.ui-autocomplete .focus .buy.lock.failure, ul.ui-autocomplete .focus .buy.failure {
background-image: url("img/failure.png"); background-image: url("img/failure.png");
} }
#header .search ul.ui-autocomplete .meta { ul.ui-autocomplete .meta {
width: 210px; width: 210px;
} }
#header .search ul.ui-autocomplete .meta:first-line { ul.ui-autocomplete .meta:first-line {
font-weight: bold; font-weight: bold;
} }
#header .navigation {
text-transform: uppercase;
color: white;
border-bottom: 2px solid black;
padding-top: 10px;
position: relative;
z-index: 1;
background-color: #3398cc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#32bbef), to(#3398cc));
background-image: -webkit-linear-gradient(top, #32bbef, #3398cc);
background-image: -moz-linear-gradient(top, #32bbef, #3398cc);
background-image: -ms-linear-gradient(top, #32bbef, #3398cc);
background-image: -o-linear-gradient(top, #32bbef, #3398cc);
background-image: linear-gradient(top, #32bbef, #3398cc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#32bbef', EndColorStr='#3398cc');
}
#header .navigation > * {
display: inline-block;
vertical-align: middle;
}
#header .navigation h1 {
color: white;
margin: 0 20px 0 0;
text-shadow: 0 -1px #777777;
}
#header .navigation li {
display: inline-block;
font-weight: bold;
margin-right: 10px;
}
#header .navigation li a {
display: block;
text-align: center;
vertical-align: middle;
padding: 10px 15px;
margin: 3px 0;
color: white;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
/* useful if you don't want a bg color from leaking outside the border: */
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
-webkit-transition: background .2s, box-shadow .2s;
-moz-transition: background .2s, box-shadow .2s;
-ms-transition: background .2s, box-shadow .2s;
-o-transition: background .2s, box-shadow .2s;
transition: background .2s, box-shadow .2s;
}
#header .navigation li a:hover {
background: white;
color: #3398cc;
-moz-box-shadow: 0 1px 0 0 #777777 inset;
-webkit-box-shadow: 0 1px 0 0 #777777 inset;
box-shadow: 0 1px 0 0 #777777 inset;
-webkit-transition: background .2s, box-shadow .2s;
-moz-transition: background .2s, box-shadow .2s;
-ms-transition: background .2s, box-shadow .2s;
-o-transition: background .2s, box-shadow .2s;
transition: background .2s, box-shadow .2s;
}
#header .navigation .balance {
float: right;
display: block;
padding: 10px 0;
margin: 3px 0;
}
form.login {
width: 300px;
margin: 60px auto;
border: 1px solid #e5e5e5;
padding: 20px;
-moz-box-shadow: 1px 1px 2px #eaeaea;
-webkit-box-shadow: 1px 1px 2px #eaeaea;
box-shadow: 1px 1px 2px #eaeaea;
}
form.login label {
display: block;
margin-top: 10px;
margin-bottom: 3px;
}
form.login input {
font-size: 20px;
width: 97%;
padding: 5px 3px;
}
form.login .button {
margin: 12px auto 0;
float: none;
width: 70%;
}
table.itemList { table.itemList {
width: 100%; width: 100%;
} }
@ -553,23 +348,6 @@ table.itemListContainer > tbody > tr:first-child ~ tr > td {
-webkit-box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset; -webkit-box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset;
box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset; box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset;
} }
.viewControl {
border-bottom: 1px solid #007bba;
margin-bottom: 18px;
padding-bottom: 7px;
}
.viewControl h2:after,
.viewControl h3:after,
.viewControl h4:after,
.viewControl h5:after {
content: ": ";
}
.viewControl > * {
display: inline-block;
float: none;
vertical-align: middle;
margin: 0 10px 0 0;
}
.textData thead, .textData tfoot { .textData thead, .textData tfoot {
background-color: #111111; background-color: #111111;
} }
@ -625,34 +403,3 @@ table.itemListContainer > tbody > tr:first-child ~ tr > td {
.transaction input[type="text"], .transaction select { .transaction input[type="text"], .transaction select {
font-size: 16px; font-size: 16px;
} }
.notice, .error, .ok {
position: fixed;
bottom: 0;
left: -5px;
width: 100%;
border-style: solid;
border-width: 1px 0 0 0;
padding: 7px 15px;
margin-top: 10px;
font-weight: bold;
}
.notice h2, .error h2, .ok h2 {
font-size: 14px;
color: inherit;
border-bottom: 0;
}
.notice {
background-color: #FFF6BF;
border-color: #FFD324;
color: #514721;
}
.error {
background: #FBE3E4;
color: #8A1F11;
border-color: #FBC2C4;
}
.ok {
background: #E6EFC2;
color: #264409;
border-color: #C6D880;
}

@ -12,39 +12,7 @@
@import "fonts.css"; @import "fonts.css";
@import "jquery.gritter.css"; @import "jquery.gritter.css";
@import "../bootstrap/css/bootstrap.min.css";
/* this is a css style reset. theres much discussion if something like this
is helpful and appropriate. well... its here for now, so please dont
change anything in the following block */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
background: transparent;
border: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
}
ol, ul, li { list-style: none; }
a:focus, input:focus { outline: none; }
body { line-height: 1; }
blockquote { quotes: none; }
blockquote:before, blockquote:after { content: ''; content: none; }
del { text-decoration: line-through; }
table { border-collapse: collapse; border-spacing: 0; }
a img { border: none; }
a { text-decoration: none; color: inherit; }
/* end of the css style reset block. feel free to change things */
// less functions // less functions
@ -118,10 +86,15 @@ a { text-decoration: none; color: inherit; }
body { body {
background: white; background: white;
font: 11px @ftText; font-family: @ftText;
padding-top: 60px;
}
td {
word-wrap: break-word;
} }
h1, h2, h3, h4, h5, h6, th { h1, h2, h3, h4, h5, h6 {
clear: both; clear: both;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
@ -151,237 +124,151 @@ h3 {
display: block; display: block;
} }
a { .navbar-inner {
color: @clrMediumBlue; border-radius: 0;
&:hover { a.brand {
color: white; background: url("@{fldImages}/logo.png") 6px center no-repeat transparent;
background-color: @clrMediumBlue; padding-left: 37px;
} }
} }
.content { .navbar-search {
padding: 5px; margin-bottom: -6px;
}
input, select {
padding: 2px 5px;
border: 1px solid #E5E5E5;
/* hack for webkit-based browser to hide borders */ span {
background: url("@{fldImages}/404") white; margin-top: -6px;
}
} }
input { ul.thumbnails {
&[type="text"], &[type="search"], &[type="password"] { div.thumbnail {
&:focus { text-align: center;
background: #FAFFBD;
&:hover {
border-color: @clrDarkBlue;
} }
}
}
p { h4 a, h5 a{
margin-bottom: 7px; white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: block;
padding: 2px 0;
}
}
} }
#header { .table thead.no-border {
margin-bottom: 20px; th, td {
position: relative; border-top: 0;
z-index: 100;
> div {
padding: 5px 10px;
} }
}
.search { a {
height: 40px; color: @clrMediumBlue;
position: relative;
z-index: 2;
background-color: @clrDarkGrey;
.vertical-linear-gradient(@clrMediumGrey, @clrDarkGrey);
.box-shadow(0 3px 8px 0 black);
> div { &:hover {
background: url("@{fldImages}/logo.png") 0 center no-repeat transparent; color: white;
height: 100%; background-color: @clrMediumBlue;
}
input { &.image {
width: 300px; color: inherit;
height: 30px; background-color: inherit;
float: right;
} }
}
}
ul.ui-autocomplete { ul.ui-autocomplete {
background: white; background: white;
width: 298px; width: 298px;
border-width: 0 1px 1px 1px; border-width: 0 1px 1px 1px;
border-style: solid; border-style: solid;
border-color: black; border-color: black;
z-index: 100; z-index: 100;
li.ui-menu-item {
display: table-row;
&:hover, &.focus {
.vertical-linear-gradient(@clrLightBlue, @clrMediumBlue);
.box-shadow(0 0 5px @clrMediumGrey);
a {
color: white !important;
}
}
a {
span {
line-height: 1;
vertical-align: top;
img {
height: 50px;
}
}
&#ui-active-menuitem.ui-corner-all div {
color: #FF0084;
}
&.ui-corner-all span {
display: table-cell;
}
}
}
.preview, .buy, .meta {
height: 50px;
padding: 5px;
font-size: 10px;
}
.preview {
width: 50px;
overflow: hidden;
text-align: center;
vertical-align: middle;
}
.buy {
vertical-align: middle;
width: 50px;
}
.focus .buy { li.ui-menu-item {
background-image: url("@{fldImages}/alt.png"); display: table-row;
background-repeat: no-repeat;
background-position: 2px center;
}
.focus .buy.lock { &:hover, &.focus {
background-image: url("@{fldImages}/buy.png"); .vertical-linear-gradient(@clrLightBlue, @clrMediumBlue);
} .box-shadow(0 0 5px @clrMediumGrey);
.focus .buy.lock.load, a {
.focus .buy.load { color: white !important;
background-image: url("@{fldImages}/load.svg");
} }
}
.focus .buy.lock.success, a {
.focus .buy.success { span {
background-image: url("@{fldImages}/success.png"); line-height: 1;
} vertical-align: top;
.focus .buy.lock.failure, img {
.focus .buy.failure { height: 50px;
background-image: url("@{fldImages}/failure.png"); }
} }
.meta { &#ui-active-menuitem.ui-corner-all div {
width: 210px; color: #FF0084;
} }
.meta:first-line { &.ui-corner-all span {
font-weight: bold; display: table-cell;
} }
} }
} }
.navigation { .preview, .buy, .meta {
text-transform: uppercase; height: 50px;
color: white; padding: 5px;
border-bottom: 2px solid black; font-size: 10px;
padding-top: 10px; }
position: relative;
z-index: 1;
background-color: @clrMediumBlue;
.vertical-linear-gradient(@clrLightBlue, @clrMediumBlue);
> * { .preview {
display: inline-block; width: 50px;
vertical-align: middle; overflow: hidden;
} text-align: center;
vertical-align: middle;
}
h1 { .buy {
color: white; vertical-align: middle;
margin: 0 20px 0 0; width: 50px;
text-shadow: 0 -1px #777; }
}
li { .focus .buy {
display: inline-block; background-image: url("@{fldImages}/alt.png");
font-weight: bold; background-repeat: no-repeat;
margin-right: 10px; background-position: 2px center;
}
a { .focus .buy.lock {
display: block; background-image: url("@{fldImages}/buy.png");
text-align: center; }
vertical-align: middle;
padding: 10px 15px;
margin: 3px 0;
color: white;
.border-radius(20px);
.transition(~"background .2s, box-shadow .2s");
&:hover {
background: white;
color: @clrMediumBlue;
.box-shadow(0 1px 0 0 #777 inset);
.transition(~"background .2s, box-shadow .2s");
}
}
}
.balance { .focus .buy.lock.load,
float: right; .focus .buy.load {
display: block; background-image: url("@{fldImages}/load.svg");
padding: 10px 0;
margin: 3px 0;
}
} }
}
form.login { .focus .buy.lock.success,
width: 300px; .focus .buy.success {
margin: 60px auto; background-image: url("@{fldImages}/success.png");
border: 1px solid @clrMediumLightGrey; }
padding: 20px;
.box-shadow(1px 1px 2px @clrLightGrey);
label { .focus .buy.lock.failure,
display: block; .focus .buy.failure {
margin-top: 10px; background-image: url("@{fldImages}/failure.png");
margin-bottom: 3px;
} }
input { .meta {
font-size: 20px; width: 210px;
width: 97%;
padding: 5px 3px;
} }
.button { .meta:first-line {
margin: 12px auto 0; font-weight: bold;
float: none;
width: 70%;
} }
} }
@ -557,25 +444,6 @@ table.itemListContainer {
} }
} }
.viewControl {
border-bottom: 1px solid @clrDarkBlue;
margin-bottom: 18px;
padding-bottom: 7px;
h2, h3, h4, h5 {
&:after {
content: ": ";
}
}
> * {
display: inline-block;
float: none;
vertical-align: middle;
margin: 0 10px 0 0;
}
}
.textData { .textData {
thead, tfoot { thead, tfoot {
background-color: @clrDarkGrey; background-color: @clrDarkGrey;
@ -648,41 +516,4 @@ table.itemListContainer {
input[type="text"], select { input[type="text"], select {
font-size: 16px; font-size: 16px;
} }
} }
.notice, .error, .ok {
position: fixed;
bottom: 0;
left: -5px;
width: 100%;
border-style: solid;
border-width: 1px 0 0 0;
padding: 7px 15px;
margin-top: 10px;
font-weight: bold;
h2 {
font-size: 14px;
color: inherit;
border-bottom: 0;
}
}
.notice {
background-color: #FFF6BF;
border-color: #FFD324;
color: #514721;
}
.error {
background: #FBE3E4;
color: #8A1F11;
border-color: #FBC2C4;
}
.ok {
background: #E6EFC2;
color: #264409;
border-color: #C6D880;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -7,11 +7,14 @@
*/ */
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
$(".content").tooltip({
selector: "*[rel=tooltip]"
});
if(!$("html").hasClass("loggedIn")) if(!$("html").hasClass("loggedIn"))
return; return;
var search_input = $("div.search input.autocomplete"); var search_input = $(".navbar-search input");
var selected_item = []; var selected_item = [];
var selection = false; var selection = false;
var lock = false; var lock = false;
@ -26,10 +29,10 @@ jQuery(document).ready(function($) {
}; };
var updateBalance = function(newBalance) { var updateBalance = function(newBalance) {
var balanceString = $("span.balance").text().split(": "); var balanceString = $(".balance").text().split(": ");
balanceString[1] = parseFloat(newBalance).toFixed(2).replace(".", ",") + " €"; balanceString[1] = parseFloat(newBalance).toFixed(2).replace(".", ",") + " €";
$("span.balance").text(balanceString.join(": ")); $(".balance").text(balanceString.join(": "));
} }
$.extend($.gritter.options, { $.extend($.gritter.options, {
@ -46,7 +49,7 @@ jQuery(document).ready(function($) {
if(button.hasClass("locked")) if(button.hasClass("locked"))
return; return;
dataContainer = button.parent(); dataContainer = button.closest(".btn-group");
dataContainer.children().addClass("locked"); dataContainer.children().addClass("locked");
var id = dataContainer.attr("data-id"); var id = dataContainer.attr("data-id");
@ -91,13 +94,14 @@ jQuery(document).ready(function($) {
}); });
search_input.val(""); search_input.val("");
$("div.search form").removeAttr("action") $(".navbar-search").removeAttr("action")
.children("input[type='submit']").remove(); .children("input[type='submit']").remove();
search_input.autocomplete({ search_input.autocomplete({
source: source, source: source,
html: true, html: true,
appendTo: ".search", appendTo: "body",
position: { my: "right top", at: "right bottom", collision: "none" },
close: function(event, ui) { close: function(event, ui) {
}, },

@ -80,3 +80,12 @@ if not SECRET_KEY or SECRET_KEY == '':
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured("Please set a SECRET_KEY in your settings.py") raise ImproperlyConfigured("Please set a SECRET_KEY in your settings.py")
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
)

@ -10,142 +10,148 @@
{% endcomment %} {% endcomment %}
{% block "content" %} {% block "content" %}
{% if user.get_profile.balance > 0 %} <div class="row-fluid">
<h3>Dein Kontostand: {{ user.get_profile.balance|floatformat:2 }}</h3> <div class="span6">
{% else %} <h2>Konto aufladen</h2>
<h3><font color="red">Dein Kontostand: {{ user.get_profile.balance|floatformat:2 }}</font></h3> {% if transacted %}
{% endif %} <div class="alert {% if error %}alert-error{% else %}alert-success{% endif %}">
{% if transacted %} {% if error %}
{% if error %} <h4 class="alert-heading">Beim Aufladen ist ein Fehler aufgetreten.</h4>
<font color="red"><h1>Es ist beim Aufladen ein Fehler aufgetreten.</h1></font> {% else %}
{% else %} <h4 class="alert-heading">Du hast Geld aufgeladen.</h4>
<font color="green"><h1>Du hast Geld aufgeladen.</h1></font> {% endif %}
{% endif %} </div>
{% endif %} {% endif %}
<h2>Konto aufladen</h2> <form method="post" action="/transaction/" class="form-horizontal">
<form method="POST" class="transaction" action="/transaction/"> {% csrf_token %}
{% csrf_token %} <input type="hidden" name="_formtype" value="normal" />
<input type="hidden" name="_formtype" value="normal" /> {% include "form.html" with form=form %}
{{ form.as_table }} <div class="control-group">
<input type="submit" class="button" value="Einzahlen" /> <div class="controls">
</form> <input type="submit" class="btn btn-primary" value="Einzahlen" />
</div>
</div>
<h3>Kontodaten:</h3> <h3>Kontodaten:</h3>
<table> {% include "treasurer.html" %}
<tr> </form>
<td>Konto-Inhaber:</td> <td>Alexander Eichner</td> </div>
</tr>
<tr>
<td>Konto-No.::</td> <td>3854536</td>
</tr>
<tr>
<td>BLZ:</td> <td>20041155</td>
</tr>
<tr>
<td><b>Betreff:</b></td> <td><b>{{ user.username }}</b></td>
</tr>
</table>
<h2>Geld &uuml;berweisen</h2> <div class="span6">
{% if transacted %} <h2>Geld überweisen</h2>
{% if error %} {% if transacted %}
<font color="red"><h1>Beim &uuml;berweisen ist ein Fehler aufgetreten..</h1></font> <div class="alert {% if error %}alert-error{% else %}alert-success{% endif %}">
{% else %} {% if error %}
<font color="green"><h1>Du hast Geld &uuml;berwiesen.</h1></font> <h4 class="alert-heading">Beim Überweisen ist ein Fehler aufgetreten.</h4>
{% endif %} {% else %}
{% endif %} <h4 class="alert-heading">Du hast Geld aufgeladen.</h4>
<form method="POST" class="transaction" action="/transaction/"> {% endif %}
{% csrf_token %} </div>
<input type="hidden" name="_formtype" value="virtual" /> {% endif %}
{{ vform.as_table }} <form method="post" action="/transaction/" class="form-horizontal">
<input type="submit" class="button" value="&Uuml;berweisen" /> {% csrf_token %}
</form> <input type="hidden" name="_formtype" value="virtual" />
{% include "form.html" with form=vform %}
<div class="control-group">
<div class="controls">
<input type="submit" class="btn btn-primary" value="Überweisen" />
</div>
</div>
</form>
</div>
</div>
<h2>Vergangene Transaktionen</h2> <div class="row-fluid">
<table class="textData"> <div class="span6">
<thead> <h2>Vergangene Transaktionen</h2>
<tr> <table class="table table-striped table-condensed">
<th>Datum</th> <thead>
<th>Uhrzeit</th> <tr>
<th>Betrag</th> <th>Datum</th>
<th>Typ</th> <th>Uhrzeit</th>
<th>Status</th> <th>Betrag</th>
</tr> <th>Typ</th>
</thead> <th>Status</th>
</tr>
</thead>
<tbody> <tbody>
{% for transaction in history %} {% for transaction in history %}
<tr> <tr>
<td>{{ transaction.dateTime|date:"j. F Y" }}</td> <td>{{ transaction.dateTime|date:"j. F Y" }}</td>
<td>{{ transaction.dateTime|date:"H:i" }} Uhr</td> <td>{{ transaction.dateTime|date:"H:i" }} Uhr</td>
<td>{{ transaction.amount|floatformat:2 }}€</td> <td>{{ transaction.amount|floatformat:2 }}€</td>
<td>{{ transaction.transactionType }}</td> <td>{{ transaction.transactionType }}</td>
<td> <td>
{% if not transaction.transactionType.needsCheck or transaction.checked %} {% if not transaction.transactionType.needsCheck or transaction.checked %}
<span class="icon approved" title="Zahlung eingegangen">Zahlung eingegangen</span> <span class="icon approved" title="Zahlung eingegangen">Zahlung eingegangen</span>
{% else %} {% else %}
<span class="icon pending" title="Zahlungsbestätigung steht noch aus">Zahlungsbestätigung steht noch aus</span> <span class="icon pending" title="Zahlungsbestätigung steht noch aus">Zahlungsbestätigung steht noch aus</span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<th>Datum</th> <th>Datum</th>
<th>Uhrzeit</th> <th>Uhrzeit</th>
<th>Betrag</th> <th>Betrag</th>
<th>Typ</th> <th>Typ</th>
<th>Status</th> <th>Status</th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
</div>
<h2>Vergangene virtuelle Transaktionen</h2> <div class="span6">
<table class="textData"> <h2>Vergangene virtuelle Transaktionen</h2>
<thead> <table class="table table-striped table-condensed">
<tr> <thead>
<th>Datum</th> <tr>
<th>Uhrzeit</th> <th>Datum</th>
<th>Betrag</th> <th>Uhrzeit</th>
<th>Sender</th> <th>Betrag</th>
<th>Typ</th> <th>Sender</th>
<th>Recipient</th> <th>Typ</th>
<th>Comment</th> <th>Recipient</th>
</tr> <th>Comment</th>
</thead> </tr>
</thead>
<tbody> <tbody>
{% for transaction in vhistory %} {% for transaction in vhistory %}
<tr> <tr>
<td>{{ transaction.dateTime|date:"j. F Y" }}</td> <td>{{ transaction.dateTime|date:"j. F Y" }}</td>
<td>{{ transaction.dateTime|date:"H:i" }} Uhr</td> <td>{{ transaction.dateTime|date:"H:i" }} Uhr</td>
<td>{{ transaction.amount|floatformat:2 }}€</td> <td>{{ transaction.amount|floatformat:2 }}€</td>
<td>{{ transaction.user }}</td> <td>{{ transaction.user }}</td>
<td><script type="text/javascript"> <td>
if ('{{ user.username }}' == '{{ transaction.user }}'){ {% if user.username|stringformat:"s" == transaction.user|stringformat:"s" %}
document.write('<span class="icon cashOut" title="Zahlung abgebucht">Zahlung abgebucht</span>'); <span class="icon cashOut" title="Zahlung abgebucht">Zahlung abgebucht</span>
} else { {% else %}
document.write('<span class="icon cashIn" title="Zahlung eingegangen">Zahlung eingegangen</span>'); <span class="icon cashIn" title="Zahlung eingegangen">Zahlung eingegangen</span>
} {% endif %}
</script></td> </td>
<td>{{ transaction.recipient }}</td> <td>{{ transaction.recipient }}</td>
<td>{{ transaction.comment }}</td> <td>{{ transaction.comment }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<th>Datum</th> <th>Datum</th>
<th>Uhrzeit</th> <th>Uhrzeit</th>
<th>Betrag</th> <th>Betrag</th>
<th>Sender</th> <th>Sender</th>
<th>Typ</th> <th>Typ</th>
<th>Recipient</th> <th>Recipient</th>
<th>Comment</th> <th>Comment</th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
</div>
</div>
{% endblock %} {% endblock %}

@ -0,0 +1,18 @@
<table class="table">
<tr>
<th>Kontoinhaber_in:</th>
<td>Alexander Eichner</td>
</tr>
<tr>
<th>Kontonummer</th>
<td>3854536</td>
</tr>
<tr>
<th>Bankleitzahl</th>
<td>20041155</td>
</tr>
<tr>
<th>Betreff</th>
<td>{{ user.username }}</td>
</tr>
</table>

@ -0,0 +1,32 @@
{% comment %}
# This file is part of k4ever, a point-of-sale system
# Contact............ <k4ever@lists.someserver.de>
# Website............ http://k4ever.someserver.de/
# Bug tracker........ http://k4ever.someserver.de/report
#
# Licensed under GNU Affero General Public License v3 or later
{% endcomment %}
{% comment %}
Add the necessary account information for your treasurer and rename
this file to "treasurer.html"
{% comment %}
<table class="table">
<tr>
<th>Kontoinhaber_in:</th>
<td></td>
</tr>
<tr>
<th>Kontonummer</th>
<td></td>
</tr>
<tr>
<th>Bankleitzahl</th>
<td></td>
</tr>
<tr>
<th>Betreff</th>
<td></td>
</tr>
</table>
Loading…
Cancel
Save