From 70f087a4f31da35776d803b0190a1b29caf21441 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 13 Feb 2013 12:55:19 +0100 Subject: Also print 'future' const expenses --- controller.py | 5 ++++- templates/pages/constlist.mako | 23 +++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/controller.py b/controller.py index 66039ac..0ba696e 100644 --- a/controller.py +++ b/controller.py @@ -150,6 +150,7 @@ class Const: current = [] old = [] + future = [] for e in expenses: if e.start <= d: @@ -157,8 +158,10 @@ class Const: current.append(e) else: old.append(e) + else: + future.append(e) - return render("constlist", current = current, old = old) + return render("constlist", current = current, old = old, future = future) else: exp = ConstExpense.get(id) diff --git a/templates/pages/constlist.mako b/templates/pages/constlist.mako index 6084d11..f870b80 100644 --- a/templates/pages/constlist.mako +++ b/templates/pages/constlist.mako @@ -9,12 +9,23 @@ % endfor -

Veraltet

- +% if future: +

Zukünftige

+ +% endif + +% if old: +

Veraltet

+ +% endif <%block name="heading"> Konstante Kosten -- cgit v1.2.3-54-g00ecf