summaryrefslogtreecommitdiff
path: root/templates/pages
diff options
context:
space:
mode:
Diffstat (limited to 'templates/pages')
-rw-r--r--templates/pages/const.mako26
-rw-r--r--templates/pages/constlist.mako19
-rw-r--r--templates/pages/show.mako12
3 files changed, 48 insertions, 9 deletions
diff --git a/templates/pages/const.mako b/templates/pages/const.mako
new file mode 100644
index 0000000..a65a260
--- /dev/null
+++ b/templates/pages/const.mako
@@ -0,0 +1,26 @@
+<%inherit file="/page.mako" />
+
+<ul class="arrow">
+ <li><span class="heading">Description:</span> ${exp.description}</li>
+ <li><span class="heading">Expense:</span> ${exp.expense}</li>
+ <li><span class="heading">Monthly expense:</span> ${exp.monthly}</li>
+ <li><span class="heading">Start Date:</span> ${dformat(exp.start)}</li>
+ <li><span class="heading">End Date:</span> ${dformat(exp.end)}</li>
+ <li><span class="heading">Occurrence (every x months):</span> ${exp.months}</li>
+</ul>
+<p><a href=${"/const/edit/%s" % exp.id | url}>Edit</a> <a href=${"/const/add/from/%s" % exp.id | url}>Create new based on this</a></p>
+
+<%
+ p = exp.prev
+ if p:
+ context.write(self.left_arrow("const/%s" % p.id, p.description))
+
+ p = exp.next
+ if p:
+ context.write(self.right_arrow("const/%s" % p.id, p.description))
+%>
+
+
+<%def name="heading()">
+ Constant Expense
+</%def>
diff --git a/templates/pages/constlist.mako b/templates/pages/constlist.mako
new file mode 100644
index 0000000..83fd9f3
--- /dev/null
+++ b/templates/pages/constlist.mako
@@ -0,0 +1,19 @@
+<%inherit file="/page.mako" />
+
+<h2>Current</h2>
+<ul class="arrow">
+ % for c in current:
+ <li><a href=${"/const/%s" % c.id | url}>${c.description} (${c.expense})</a></li>
+ % endfor
+</ul>
+
+<h2>Outdated</h2>
+<ul class="arrow">
+ % for c in old:
+ <li><a href=${"/const/%s" % c.id | url}>${c.description} (${c.expense})</a></li>
+ % endfor
+</ul>
+
+<%def name="heading()">
+ Constant Expenses
+</%def>
diff --git a/templates/pages/show.mako b/templates/pages/show.mako
index 4a8f9ff..ea9f2e2 100644
--- a/templates/pages/show.mako
+++ b/templates/pages/show.mako
@@ -11,7 +11,7 @@
% endfor
<%self:detail name="Constant" sum="${e.constsum}" set="${e.consts}" args="exp">
- <a href=${"/const/edit/%s" % exp.id | url}>${exp.monthly} -- ${exp.description}</a>
+ <a href=${"/const/%s" % exp.id | url}>${exp.monthly} -- ${exp.description}</a>
</%self:detail>
<%self:detail name="In Summa" sum="${e.sum}" set="${e.all}" args="exp">
@@ -26,10 +26,7 @@
else:
date = "%s/%s" % (e.date.year, e.date.month - 1)
%>
-<a id="left" href=${"/" + date | url}>
- <img src=${"/static/images/arrow_left.png" | url} />
- <span class="navdate">${date}</span>
-</a>
+${self.left_arrow(date, date)}
% if not is_last:
<%
@@ -38,10 +35,7 @@
else:
date = "%s/%s" % (e.date.year, e.date.month + len(exps))
%>
- <a id="right" href=${"/" + date | url}>
- <span class="navdate">${date}</span>
- <img src=${"/static/images/arrow_right.png" | url}/>
- </a>
+ ${self.right_arrow(date, date)}
% endif
<%def name="heading()">