summaryrefslogtreecommitdiff
path: root/templates/pages/show.mako
diff options
context:
space:
mode:
Diffstat (limited to 'templates/pages/show.mako')
-rw-r--r--templates/pages/show.mako52
1 files changed, 52 insertions, 0 deletions
diff --git a/templates/pages/show.mako b/templates/pages/show.mako
new file mode 100644
index 0000000..dc23b9c
--- /dev/null
+++ b/templates/pages/show.mako
@@ -0,0 +1,52 @@
+<%inherit file="/page.mako" />
+
+% for e in exps:
+ % if len(exps) > 1:
+ <h2>${get_d(e)}</h2>
+ % endif
+ % for c in e.catexps:
+ <strong class="details_heading">${c.cat.name}</strong> ${c.expense}<br/>
+ <div class="details">
+ <ul>
+ % for exp in c.all:
+ <li><a href=${"/edit/%s" % exp.id | url}>${exp.day}.${exp.month}. -- ${exp.description}: ${exp.expense}</a></li>
+ % endfor
+ </ul>
+ </div>
+ % endfor
+ <strong class="details_heading">Constant:</strong> ${e.constsum}<br/>
+ <div class="details">
+ <ul>
+ % for c in e.consts:
+ <li>${c.monthly} -- ${c.description}</li>
+ % endfor
+ </ul>
+ </div>
+ <strong class="details_heading">In Summa:</strong> ${e.sum}<br />
+ <div class="details">
+ <ul>
+ % for exp in e.all:
+ <li><a href=${"/edit/%s" % exp.id | url}>${exp.day}.${exp.month}. -- ${exp.description}: ${exp.expense}</a></li>
+ % endfor
+ </ul>
+ </div>
+ <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>
+
+<%def name="js()">
+ ${parent.js()}
+ <script type="text/javascript" src=${"/static/js/show.js" | url}></script>
+</%def>