aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-16 20:27:00 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-16 20:27:00 +0000
commit096e94906cfcb29ae4913d26d136fa834b8e905b (patch)
tree607bc5342d5620b09b12ecf1ca6bc167816ed9c5 /tmpl
parent89f4b7b98b6138c2ec10dc42e22d3bd27aab33bf (diff)
downloadmgatres-096e94906cfcb29ae4913d26d136fa834b8e905b.tar
mgatres-096e94906cfcb29ae4913d26d136fa834b8e905b.tar.gz
mgatres-096e94906cfcb29ae4913d26d136fa834b8e905b.tar.bz2
mgatres-096e94906cfcb29ae4913d26d136fa834b8e905b.tar.xz
mgatres-096e94906cfcb29ae4913d26d136fa834b8e905b.zip
Add per account transactions pages
git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8286 5b7c3c08-40e5-403b-9995-ace06908e4af
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/index.html6
-rw-r--r--tmpl/tra_row.html2
-rw-r--r--tmpl/transactions_by_ac.html30
3 files changed, 33 insertions, 5 deletions
diff --git a/tmpl/index.html b/tmpl/index.html
index 511c4b3..0c8153f 100644
--- a/tmpl/index.html
+++ b/tmpl/index.html
@@ -30,13 +30,11 @@
<ul>
<li>Global balances: [% transactions.balance %] Euros</li>
- [%- FOR ac IN transactions.by_ac.values -%]
- <li>[% ac.account %] : [% ac.balance %] Euros</li>
+ [%- FOR ac IN transactions.by_ac.keys -%]
+ <li><a href="a_[% ac %].html">[% transactions.by_ac.$ac.account %]</a>: [% transactions.by_ac.$ac.balance %] Euros</li>
[%- END -%]
</ul>
- More details coming soon.
-
<h3>Expenses and revenues by category</h3>
<ul>
diff --git a/tmpl/tra_row.html b/tmpl/tra_row.html
index afe3f56..ae3caf7 100644
--- a/tmpl/tra_row.html
+++ b/tmpl/tra_row.html
@@ -1,7 +1,7 @@
<tr>
<td>[% date.format(tra.date) %]</td>
<td>[% tra.amount %]</td>
- <td>[% tra.account %]</td>
+ <td><a href="a_[% tra.ac %].html">[% tra.account %]</a></td>
<td>[% tra.who %]</td>
[% IF tra.trt %]
<td>Internal transfert</td>
diff --git a/tmpl/transactions_by_ac.html b/tmpl/transactions_by_ac.html
new file mode 100644
index 0000000..9d2e170
--- /dev/null
+++ b/tmpl/transactions_by_ac.html
@@ -0,0 +1,30 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>[% config.sitename %]: Transactions for [% account %]</title>
+ </head>
+ <body>
+ <h1>Mageia.Org transactions for [% account %]</h1>
+ <h3>Summary</h3>
+ <ul>
+ <li>
+ <b>Balance</b>: [% transactions.by_ac.$ac.balance %] Euros
+ </li>
+ </ul>
+ <h3>Details</h3>
+ <table border="1">
+ <tr>
+ <th>Date</th>
+ <th>Amount</th>
+ <th>Account</th>
+ <th>Who</th>
+ <th>Notes</th>
+ <th>Category</th>
+ </tr>
+ [%- USE date(format='%Y/%m/%d') -%]
+ [% FOR tra IN transactions.by_ac.$ac.transactions.sort('date').reverse %]
+ [%- INCLUDE tra_row.html %]
+ [%- END -%]
+ </table>
+ </body>
+</html>