diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-07-05 22:58:43 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-07-05 22:58:43 +0200 |
commit | 47c0ab4982cb9ee9c15ce0d055ad830b1ec9e5b6 (patch) | |
tree | 194ee950628136999bf09b0d92f9edf6f5dbfda4 /templates/pages/show.mako | |
parent | 8cd09034a8d4bc5f43730fa169bf1b40f29b8042 (diff) | |
download | kosten-47c0ab4982cb9ee9c15ce0d055ad830b1ec9e5b6.tar.gz kosten-47c0ab4982cb9ee9c15ce0d055ad830b1ec9e5b6.tar.bz2 kosten-47c0ab4982cb9ee9c15ce0d055ad830b1ec9e5b6.zip |
Add month navigation
Diffstat (limited to 'templates/pages/show.mako')
-rw-r--r-- | templates/pages/show.mako | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/templates/pages/show.mako b/templates/pages/show.mako index 054c287..cf14638 100644 --- a/templates/pages/show.mako +++ b/templates/pages/show.mako @@ -20,13 +20,34 @@ <br/> % endfor +<% + if e.date.month == 1: + date = "%s/12" % (e.date.year - 1) + 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> + +<% + if e.date.month == 13 - len(exps): + date = "%s/1" % (e.date.year + 1) + 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> + <%def name="heading()"> % if len(exps) > 1: Current expenses % else: Expenses for ${get_d(exps[0])} % endif - </%def> <%def name="get_d(e)"> |