summaryrefslogtreecommitdiff
path: root/templates/show.mako
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/show.mako25
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/show.mako b/templates/show.mako
new file mode 100644
index 0000000..270477a
--- /dev/null
+++ b/templates/show.mako
@@ -0,0 +1,25 @@
+<%inherit file="/page.mako" />
+
+% for e in exps:
+ % if len(exps) > 1:
+ <h2>${get_d(e)}</h2>
+ % endif
+ % for c in e.catexps:
+ <strong>${c.cat.name}</strong> ${c.expense}<br>
+ % endfor
+ <strong>Constant:</strong> ${e.const}<br>
+ <strong>In Summa:</strong> ${e.sum}<br><br>
+% endfor
+
+<%def name="heading()">
+ % if len(exps) > 1:
+ Current expenses
+ % else:
+ Expenses for ${get_d(exps[0])}
+ % endif
+
+</%def>
+
+<%def name="get_d(e)">
+ ${e.date.year}/${e.date.month}
+</%def>