From 17e9321eedba990d9bbc4ff770ff6d9248faee36 Mon Sep 17 00:00:00 2001 From: seba Date: Sat, 15 Oct 2011 03:43:33 +0200 Subject: [PATCH] added thumbnail support (kudoes to tannek) --- devel/README | 8 +++++ devel/TODO | 2 ++ .../buyable/templates/buyables/history.html | 4 ++- k4ever/buyable/templates/buyables/main | 31 ------------------- .../templates/buyables/product_list.html | 6 ++-- .../buyable/templates/buyables/showItem.html | 4 ++- k4ever/main/templates/main/product_list.html | 4 ++- k4ever/main/templates/main/search-form.html | 4 +-- .../templates/registration/loginForm.html | 8 ++++- k4ever/settings.py | 3 +- 10 files changed, 34 insertions(+), 40 deletions(-) delete mode 100644 k4ever/buyable/templates/buyables/main diff --git a/devel/README b/devel/README index 55038fa..9b35276 100644 --- a/devel/README +++ b/devel/README @@ -11,6 +11,14 @@ and overengineered... But oh well, here is our attempt! Mighty Kassensystem, finally! +Dependencies +============ + - python-django >= 1.3 + - python-django-auth-ldap + - python-django-piston + - easy-thumbnails + https://github.com/SmileyChris/easy-thumbnails.git + Installation Process ==================== diff --git a/devel/TODO b/devel/TODO index 61546ec..7c1f58d 100644 --- a/devel/TODO +++ b/devel/TODO @@ -49,3 +49,5 @@ Open for discussion: Konrad: - in js verhindern, das wer durch doppelklick auf "KAUFEN" das ding 2x kauft(also 2x http request abgesetzt werden) + - BUG: Auf der HOME-seite ist das Bild direkt neben "SNACKS" nicht als link anklickbar + - BUG: directBuy-anzeige ist z.B. auf der HOME-seite hinter den "Kauf"-Buttons diff --git a/k4ever/buyable/templates/buyables/history.html b/k4ever/buyable/templates/buyables/history.html index 7fbc2be..300ea8c 100644 --- a/k4ever/buyable/templates/buyables/history.html +++ b/k4ever/buyable/templates/buyables/history.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{% load thumbnail %} + {% block "content" %} {% if history %} @@ -53,7 +55,7 @@ {% for item in order.purchase_set.all %} {% if not item.isDeposit %} - + {% else %} {{ item.buyable.name }} Pfand {% endif %} diff --git a/k4ever/buyable/templates/buyables/main b/k4ever/buyable/templates/buyables/main deleted file mode 100644 index 8fc65b2..0000000 --- a/k4ever/buyable/templates/buyables/main +++ /dev/null @@ -1,31 +0,0 @@ -{% if buyables %} - {% if removeWrapper == None %} - - - {% endif %} - {% for buyable in buyables %} - - - - - - {% endfor %} - {% if removeWrapper == None %} - -
- - {{ buyable.buyable__name }} ({{ buyable.num_buys }} mal gekauft) - {% if buyable.buyable__deposit > 0 %} - Kaufen (Ohne Pfand) - Kaufen (Mit Pfand) - {% if includeDeposit %} - Kaufen (Nur Pfand) - {% endif %} - {% else %} - Kaufen - {% endif %} -
- {% endif %} -{% else %} -

{{ default|default_if_none:"Noch keine gekauft" }}

-{% endif %} \ No newline at end of file diff --git a/k4ever/buyable/templates/buyables/product_list.html b/k4ever/buyable/templates/buyables/product_list.html index 6fe3755..aea79c0 100644 --- a/k4ever/buyable/templates/buyables/product_list.html +++ b/k4ever/buyable/templates/buyables/product_list.html @@ -1,10 +1,12 @@ +{% load thumbnail %} + {% if buyables %} {% for buyable in buyables %}
- + {{ buyable.name }} @@ -37,4 +39,4 @@
{% else %}

{{ default|default_if_none:"Noch keine gekauft" }}

-{% endif %} \ No newline at end of file +{% endif %} diff --git a/k4ever/buyable/templates/buyables/showItem.html b/k4ever/buyable/templates/buyables/showItem.html index 67774d7..f7be065 100644 --- a/k4ever/buyable/templates/buyables/showItem.html +++ b/k4ever/buyable/templates/buyables/showItem.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{% load thumbnail %} + {% block "content" %}

Zur Liste aller Items

@@ -10,7 +12,7 @@
{{ item.name }}
- + diff --git a/k4ever/main/templates/main/product_list.html b/k4ever/main/templates/main/product_list.html index 9d3ffc9..75fbd86 100644 --- a/k4ever/main/templates/main/product_list.html +++ b/k4ever/main/templates/main/product_list.html @@ -1,10 +1,12 @@ +{% load thumbnail %} + {% if buyables %} {% for buyable in buyables %}
- + {{ buyable.buyable__name }} {% if buyable.num_buys %}({{ buyable.num_buys }} mal gekauft){% endif %} diff --git a/k4ever/main/templates/main/search-form.html b/k4ever/main/templates/main/search-form.html index ee23016..569b997 100644 --- a/k4ever/main/templates/main/search-form.html +++ b/k4ever/main/templates/main/search-form.html @@ -1,6 +1,6 @@ -
+ -
\ No newline at end of file + diff --git a/k4ever/main/templates/registration/loginForm.html b/k4ever/main/templates/registration/loginForm.html index f379cb0..b83ee3e 100644 --- a/k4ever/main/templates/registration/loginForm.html +++ b/k4ever/main/templates/registration/loginForm.html @@ -18,4 +18,10 @@ - \ No newline at end of file + + + +
+

Das Kassensystem ist 'Aktiv' - nutzt euren Frunden-Account

+
+ diff --git a/k4ever/settings.py b/k4ever/settings.py index 0640914..3f05ebf 100644 --- a/k4ever/settings.py +++ b/k4ever/settings.py @@ -74,7 +74,7 @@ LOGIN_REDIRECT_URL = '/' AUTHENTICATION_BACKENDS = ( # 'main.backend.CustomLDAPBackend', -# 'django_auth_ldap.backend.LDAPBackend', + 'django_auth_ldap.backend.LDAPBackend', 'django.contrib.auth.backends.ModelBackend', ) @@ -129,4 +129,5 @@ INSTALLED_APPS = ( 'main', # Uncomment the next line to enable the admin: 'django.contrib.admin', + 'easy_thumbnails', )