Browse Source

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

master
Konrad Mohrfeldt 11 years ago
parent
commit
8c276644f5
  1. 1
      .gitignore
  2. 120
      k4ever/buyable/templates/buyables/history.html
  3. 2
      k4ever/buyable/templates/buyables/itemBought.html
  4. 64
      k4ever/buyable/templates/buyables/product_list.html
  5. 2
      k4ever/buyable/templates/buyables/showItem.html
  6. 22
      k4ever/buyable/templates/buyables/showItems.html
  7. 30
      k4ever/main/templates/base.html
  8. 14
      k4ever/main/templates/form.html
  9. 44
      k4ever/main/templates/main/navbar-content.html
  10. 20
      k4ever/main/templates/main/navigation-login.html
  11. 2
      k4ever/main/templates/main/product_list.html
  12. 156
      k4ever/main/templates/settings/settings.html
  13. 0
      k4ever/main/templatetags/__init__.py
  14. 17
      k4ever/main/templatetags/navigation_extras.py
  15. BIN
      k4ever/media/css/img/cashIn.png
  16. BIN
      k4ever/media/css/img/cashOut.png
  17. BIN
      k4ever/media/css/img/logo.png
  18. 365
      k4ever/media/css/style.css
  19. 391
      k4ever/media/css/style.less
  20. 8316
      k4ever/media/js/jquery-1.5.1.js
  21. 4
      k4ever/media/js/jquery.min.js
  22. 16
      k4ever/media/js/k4ever.js
  23. 0
      k4ever/media/js/style.css
  24. 9
      k4ever/settings.py.template
  25. 266
      k4ever/transaction/templates/transaction/overview.html
  26. 18
      k4ever/transaction/templates/treasurer.html
  27. 32
      k4ever/transaction/templates/treasurer.html.template

1
.gitignore vendored

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

120
k4ever/buyable/templates/buyables/history.html

@ -14,97 +14,59 @@ @@ -14,97 +14,59 @@
{% block "content" %}
{% if history %}
<div style="width:800px">
<h1>Fr&uuml;here Eink&auml;ufe von {{ user }}</h1>
</div>
<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>
<h2>Frühere Einkäufe von {{ user }}</h2>
<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>
<table class="details">
<thead>
<table class="table table-striped table-condensed">
<colgroup>
<col width="200px" />
</colgroup>
<thead class="no-border">
<tr>
<th>Buchung</th>
<th style="text-align:left">Einkauf</th>
<th>Einkauf</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Buchung</th>
<th style="text-align:left">Einkauf</th>
<th>Einkauf</th>
</tr>
</tfoot>
<tbody>
{% for order in history.object_list %}
<tr>
<td width="150px">
{{ order.dateTime|date:"Y-m-d H:i" }}
</td>
<td style="text-align:left">
<table>
<tr>
{% for item in order.purchase_set.all %}
<td width="80px">
{% if not item.isDeposit %}
<img src="{% thumbnail item.buyable.image 64x64 %}" width=64 height=64>
{% else %}
<b>{{ item.buyable.name }} Pfand</b>
{% endif %}
<br/>
zu {{ item.price|floatformat:2 }} €
</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>
{% for order in history.object_list %}
<tr>
<td>{{ order.dateTime|date:"j. F Y H:i" }}</td>
<td>
<ul class="thumbnails">
{% for item in order.purchase_set.all %}
<li rel="tooltip" title="{% if not item.isDeposit %}{{ item.buyable.name }}{% else %}{{ item.buyable.name }} Pfand{% endif %} für {{ item.price|floatformat:2 }} €">
<div class="thumbnail">
<img src="{% thumbnail item.buyable.image 32x32 %}" width="32" height="32" alt="{{ item.buyable.name }}" />
</div>
</li>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<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 %}
{{ error }}
Es scheint so, als h&auml;ttest du bisher noch nichts gekauft, {{ user }}.
Es scheint so, als hättest du bisher noch nichts gekauft, {{ user }}.
{% endif %}
{% endblock %}

2
k4ever/buyable/templates/buyables/itemBought.html

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

64
k4ever/buyable/templates/buyables/product_list.html

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

2
k4ever/buyable/templates/buyables/showItem.html

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

22
k4ever/buyable/templates/buyables/showItems.html

@ -10,14 +10,20 @@ @@ -10,14 +10,20 @@
{% endcomment %}
{% block "content" %}
<div class="viewControl">
<h3>Sortieren nach</h2>
<a class="button" href="/store/">Letzte Änderung</a>
<a class="button" href="?order=alphabet">Alphabet</a>
<a class="button" href="?order=price">Preis</a><br/>
<h2>Produktübersicht</h2>
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
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 style="width:800px">
{% include "buyables/product_list.html" with buyables=items %}
</div>
{% include "buyables/product_list.html" with buyables=items %}
{% endblock %}

30
k4ever/main/templates/base.html

@ -18,39 +18,27 @@ @@ -18,39 +18,27 @@
<script type="text/javascript">
var MEDIA_URL = "{{ MEDIA_URL }}";
</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.autocomplete.html.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>
{% block extrahead %}{% endblock %}
{% endblock head %}
<title>Freitagsrundenkasse{% block "title" %}{% endblock %}</title>
</head>
<body{%block bodyargs %}{%endblock%}>
<div id="header">
<div class="search">
<div>
{% if user.is_authenticated %}
{% include "main/search-form.html" %}
{% endif %}
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="/">Kasse</a>
{% include "main/navbar-content.html" %}
</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 class="content">
<div class="content container-fluid">
{% block "content" %}{% endblock %}
</div>
</body>

14
k4ever/main/templates/main/search-form.html → k4ever/main/templates/form.html

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

44
k4ever/main/templates/main/navbar-content.html

@ -0,0 +1,44 @@ @@ -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>

20
k4ever/main/templates/main/navigation-login.html

@ -1,20 +0,0 @@ @@ -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>

2
k4ever/main/templates/main/product_list.html

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
<a href="{% url buyable_show buyable.id %}"><img src="{% thumbnail buyable.image 64x64 %}" /></a>
</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 %}
<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>

156
k4ever/main/templates/settings/settings.html

@ -10,84 +10,90 @@ @@ -10,84 +10,90 @@
{% endcomment %}
{% block "content" %}
<div style="width:800px">
<h1>Passwort</h1>
<br />
{% if form %}
{% if password_success %}
{{ password_success }} <br />
{% endif %}
<table>
<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>
<div class="row-fluid">
<div class="span6">
<h2>Pluginberechtigungen</h2>
{% if pluginerror %}
<div class="alert alert-error">
<h4 class="alert-heading">{{ pluginerror|safe }}</h4>
</div>
{% endif %}
<th width="100px" style="vertical-align:middle">Name</th>
<th width="100px" style="vertical-align:middle">Author</th>
<th style="vertical-align:middle">Beschreibung</th>
<th width="100px" style="vertical-align:middle">AuthBlob</th>
<th width="150px" style="vertical-align:middle">Erlauben/Verbieten</th>
</tr>
{% for p in permissions %}
<tr>
<td style="vertical-align:middle; text-align:center">{{ p.plugin.name }}<br/>{{ p.plugin.version }}</td>
<td style="vertical-align:middle; text-align:center">{{ p.plugin.author }}</td>
<td style="vertical-align:middle; text-align:center"><div style="margin: 5px">{{ p.plugin.descr }}</div></td>
<td style="text-align:center">
{% if p.plugin.userCanWriteAuthblob %}
<div style="margin:5px">
<form method="post" action="/user/settings/plugin/authblob/{{ p.plugin.id }}/">
<table class="table table-striped">
<thead>
<tr>
<th>Authorisiert</th>
<th>Name</th>
<th>Autor_in</th>
<th>Beschreibung</th>
<th>AuthBlob</th>
<th>Erlauben/Verbieten</th>
</tr>
</thead>
<tbody>
{% for p in permissions %}
<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 %}
<textarea name="authblob">{{ p.authblob }}</textarea>
<input type="submit" value="Speichern">
{% include "form.html" with form=form %}
<div class="control-group">
<div class="controls">
<input class="btn btn-primary" type="submit" value="Passwort ändern" />
</div>
</div>
</form>
</div>
{% else %}
{% if p.plugin.userCanReadAuthblob %}
{{ p.authblob }}
{% 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 %}
</td>
<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>
</div>
</div>
{% endblock %}

0
k4ever/main/templatetags/__init__.py

17
k4ever/main/templates/main/navigation.html → k4ever/main/templatetags/navigation_extras.py

@ -1,13 +1,18 @@ @@ -1,13 +1,18 @@
{% comment %}
# -*- coding: utf-8 -*-
# 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>
<li><a href="/user/login/">Anmelden</a></li>
<li><a href="/user/register/">Registrieren</a></li>
</ul>
from django.template import Library
import re
register = Library()
@register.simple_tag
def active(request, pattern):
if pattern == request.path:
return "active"
return ""

BIN
k4ever/media/css/img/cashIn.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
k4ever/media/css/img/cashOut.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 904 B

BIN
k4ever/media/css/img/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

365
k4ever/media/css/style.css

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@import "fonts.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 :)
@see http://lesscss.org/ */
/*
@ -11,119 +13,20 @@ @@ -11,119 +13,20 @@
*
* 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 {
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,
h2,
h3,
h4,
h5,
h6,
th {
h6 {
clear: both;
font-weight: bold;
margin: 0;
@ -148,63 +51,48 @@ h3 { @@ -148,63 +51,48 @@ h3 {
clear: both;
display: block;
}
a {
color: #3398cc;
.navbar-inner {
border-radius: 0;
}
a:hover {
color: white;
background-color: #3398cc;
.navbar-inner a.brand {
background: url("img/logo.png") 6px center no-repeat transparent;
padding-left: 37px;
}
.content {
padding: 5px;
.navbar-search {
margin-bottom: -6px;
}
input, select {
padding: 2px 5px;
border: 1px solid #E5E5E5;
/* hack for webkit-based browser to hide borders */
background: url("img/404") white;
.navbar-search span {
margin-top: -6px;
}
input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus {
background: #FAFFBD;
ul.thumbnails div.thumbnail {
text-align: center;
}
p {
margin-bottom: 7px;
ul.thumbnails div.thumbnail:hover {
border-color: #007bba;
}
#header {
margin-bottom: 20px;
position: relative;
z-index: 100;
ul.thumbnails div.thumbnail h4 a, ul.thumbnails div.thumbnail h5 a {
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: block;
padding: 2px 0;
}
#header > div {
padding: 5px 10px;
.table thead.no-border th, .table thead.no-border td {
border-top: 0;
}
#header .search {
height: 40px;
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;
a {
color: #3398cc;
}
#header .search > div {
background: url("img/logo.png") 0 center no-repeat transparent;
height: 100%;
a:hover {
color: white;
background-color: #3398cc;
}
#header .search input {
width: 300px;
height: 30px;
float: right;
a:hover.image {
color: inherit;
background-color: inherit;
}
#header .search ul.ui-autocomplete {
ul.ui-autocomplete {
background: white;
width: 298px;
border-width: 0 1px 1px 1px;
@ -212,10 +100,10 @@ p { @@ -212,10 +100,10 @@ p {
border-color: black;
z-index: 100;
}
#header .search ul.ui-autocomplete li.ui-menu-item {
ul.ui-autocomplete li.ui-menu-item {
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-linear-gradient(top, #32bbef, #3398cc);
background-image: -moz-linear-gradient(top, #32bbef, #3398cc);
@ -227,153 +115,60 @@ p { @@ -227,153 +115,60 @@ p {
-webkit-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;
}
#header .search ul.ui-autocomplete li.ui-menu-item a span {
ul.ui-autocomplete li.ui-menu-item a span {
line-height: 1;
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;
}
#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;
}
#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;
}
#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;
padding: 5px;
font-size: 10px;
}
#header .search ul.ui-autocomplete .preview {
ul.ui-autocomplete .preview {
width: 50px;
overflow: hidden;
text-align: center;
vertical-align: middle;
}
#header .search ul.ui-autocomplete .buy {
ul.ui-autocomplete .buy {
vertical-align: middle;
width: 50px;
}
#header .search ul.ui-autocomplete .focus .buy {
ul.ui-autocomplete .focus .buy {
background-image: url("img/alt.png");
background-repeat: no-repeat;
background-position: 2px center;
}
#header .search ul.ui-autocomplete .focus .buy.lock {
ul.ui-autocomplete .focus .buy.lock {
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");
}
#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");
}
#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");
}
#header .search ul.ui-autocomplete .meta {
ul.ui-autocomplete .meta {
width: 210px;
}
#header .search ul.ui-autocomplete .meta:first-line {
ul.ui-autocomplete .meta:first-line {
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 {
width: 100%;
}
@ -553,23 +348,6 @@ table.itemListContainer > tbody > tr:first-child ~ tr > td { @@ -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;
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 {
background-color: #111111;
}
@ -625,34 +403,3 @@ table.itemListContainer > tbody > tr:first-child ~ tr > td { @@ -625,34 +403,3 @@ table.itemListContainer > tbody > tr:first-child ~ tr > td {
.transaction input[type="text"], .transaction select {
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;
}

391
k4ever/media/css/style.less

@ -12,39 +12,7 @@ @@ -12,39 +12,7 @@
@import "fonts.css";
@import "jquery.gritter.css";
/* this is a css style reset. there’s much discussion if something like this
is helpful and appropriate. well... it’s here for now, so please don’t
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 */
@import "../bootstrap/css/bootstrap.min.css";
// less functions
@ -118,10 +86,15 @@ a { text-decoration: none; color: inherit; } @@ -118,10 +86,15 @@ a { text-decoration: none; color: inherit; }
body {
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;
font-weight: bold;
margin: 0;
@ -151,237 +124,151 @@ h3 { @@ -151,237 +124,151 @@ h3 {
display: block;
}
a {
color: @clrMediumBlue;
.navbar-inner {
border-radius: 0;
&:hover {
color: white;
background-color: @clrMediumBlue;
a.brand {
background: url("@{fldImages}/logo.png") 6px center no-repeat transparent;
padding-left: 37px;
}
}
.content {
padding: 5px;
}
input, select {
padding: 2px 5px;
border: 1px solid #E5E5E5;
.navbar-search {
margin-bottom: -6px;
/* hack for webkit-based browser to hide borders */
background: url("@{fldImages}/404") white;
span {
margin-top: -6px;
}
}
input {
&[type="text"], &[type="search"], &[type="password"] {
&:focus {
background: #FAFFBD;
ul.thumbnails {
div.thumbnail {
text-align: center;
&:hover {
border-color: @clrDarkBlue;
}
}
}
p {
margin-bottom: 7px;
h4 a, h5 a{
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: block;
padding: 2px 0;
}
}
}
#header {
margin-bottom: 20px;
position: relative;
z-index: 100;
> div {
padding: 5px 10px;
.table thead.no-border {
th, td {
border-top: 0;
}
}
.search {
height: 40px;
position: relative;
z-index: 2;
background-color: @clrDarkGrey;
.vertical-linear-gradient(@clrMediumGrey, @clrDarkGrey);
.box-shadow(0 3px 8px 0 black);
a {
color: @clrMediumBlue;
> div {
background: url("@{fldImages}/logo.png") 0 center no-repeat transparent;
height: 100%;
}
&:hover {
color: white;
background-color: @clrMediumBlue;
input {
width: 300px;
height: 30px;
float: right;
&.image {
color: inherit;
background-color: inherit;
}
}
}
ul.ui-autocomplete {
background: white;
width: 298px;
border-width: 0 1px 1px 1px;
border-style: solid;
border-color: black;
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;
}
ul.ui-autocomplete {
background: white;
width: 298px;
border-width: 0 1px 1px 1px;
border-style: solid;
border-color: black;
z-index: 100;
.focus .buy {
background-image: url("@{fldImages}/alt.png");
background-repeat: no-repeat;
background-position: 2px center;
}
li.ui-menu-item {
display: table-row;
.focus .buy.lock {
background-image: url("@{fldImages}/buy.png");
}
&:hover, &.focus {
.vertical-linear-gradient(@clrLightBlue, @clrMediumBlue);
.box-shadow(0 0 5px @clrMediumGrey);
.focus .buy.lock.load,
.focus .buy.load {
background-image: url("@{fldImages}/load.svg");
a {
color: white !important;
}
}
.focus .buy.lock.success,
.focus .buy.success {
background-image: url("@{fldImages}/success.png");
}
a {
span {
line-height: 1;
vertical-align: top;
.focus .buy.lock.failure,
.focus .buy.failure {
background-image: url("@{fldImages}/failure.png");
img {
height: 50px;
}
}
.meta {
width: 210px;
&#ui-active-menuitem.ui-corner-all div {
color: #FF0084;
}
.meta:first-line {
font-weight: bold;
&.ui-corner-all span {
display: table-cell;
}
}
}
.navigation {
text-transform: uppercase;
color: white;
border-bottom: 2px solid black;
padding-top: 10px;
position: relative;
z-index: 1;
background-color: @clrMediumBlue;
.vertical-linear-gradient(@clrLightBlue, @clrMediumBlue);
.preview, .buy, .meta {
height: 50px;
padding: 5px;
font-size: 10px;
}
> * {
display: inline-block;
vertical-align: middle;
}
.preview {
width: 50px;
overflow: hidden;
text-align: center;
vertical-align: middle;
}
h1 {
color: white;
margin: 0 20px 0 0;
text-shadow: 0 -1px #777;
}
.buy {
vertical-align: middle;
width: 50px;
}
li {
display: inline-block;
font-weight: bold;
margin-right: 10px;
.focus .buy {
background-image: url("@{fldImages}/alt.png");
background-repeat: no-repeat;
background-position: 2px center;
}
a {
display: block;
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");
}
}
}
.focus .buy.lock {
background-image: url("@{fldImages}/buy.png");
}