summaryrefslogtreecommitdiff
path: root/templates/pages/const.mako
blob: ec68ef85a9a47436998b10871423df2c07bb28aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<%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>

<% 
    def create(p):
        return ("const/%s" % p.id, "%s (%s-%s)" % (p.description, dformat(p.start), dformat(p.end)))

    p = exp.prev
    if p:
        context.write(self.left_arrow(*create(p)))

    p = exp.next
    if p:
        context.write(self.right_arrow(*create(p)))
%>

<%def name="heading()">
    Constant Expense
</%def>