diff options
| author | Alexis Metaireau <ametaireau@gmail.com> | 2011-12-03 14:32:51 -0800 |
|---|---|---|
| committer | Alexis Metaireau <ametaireau@gmail.com> | 2011-12-03 14:32:51 -0800 |
| commit | 5c4178b3b5b86bb6323775aa9e483e22a2a52937 (patch) | |
| tree | 27b66d35575d5157d2c72a32409987eea0ed5264 /budget/templates | |
| parent | c5a570073c454a6f3d50ce6bc35711c3a833ccc2 (diff) | |
| parent | 1a5abcfbf2c9ceb137b42c177013bd0f54d571fe (diff) | |
| download | ihatemoney-mirror-5c4178b3b5b86bb6323775aa9e483e22a2a52937.zip ihatemoney-mirror-5c4178b3b5b86bb6323775aa9e483e22a2a52937.tar.gz ihatemoney-mirror-5c4178b3b5b86bb6323775aa9e483e22a2a52937.tar.bz2 | |
Merge pull request #72 from aavenel/master
Fix a crash in dashboard view
Diffstat (limited to 'budget/templates')
| -rw-r--r-- | budget/templates/dashboard.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/budget/templates/dashboard.html b/budget/templates/dashboard.html index 44ece2d..796f4f4 100644 --- a/budget/templates/dashboard.html +++ b/budget/templates/dashboard.html @@ -4,7 +4,16 @@ <table id="bill_table" class="list_bills common-table zebra-striped"> <thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th></tr></thead> <tbody>{% for project in projects %} - <tr><td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td><td>{{ project.get_bills()[1].date }}</td><td>{{ project.get_bills()[-1].date }}</tr> + <tr> +<td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td> +{% if project.has_bills() %} +<td>{{ project.get_bills()[0].date }}</td> +<td>{{ project.get_bills()[-1].date }}</td> +{% else %} +<td></td> +<td></td> +{% endif %} +</tr> {% endfor %}</tbody> </table> {% endblock %} |
