From 1a5abcfbf2c9ceb137b42c177013bd0f54d571fe Mon Sep 17 00:00:00 2001 From: "A.Avenel" Date: Sat, 3 Dec 2011 22:25:19 +0100 Subject: Fix for a bug introduced in last commit : crash of dashboard view when there is no bill. --- budget/templates/dashboard.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'budget/templates/dashboard.html') 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 @@ {% for project in projects %} - + + +{% if project.has_bills() %} + + +{% else %} + + +{% endif %} + {% endfor %}
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills()[1].date }}{{ project.get_bills()[-1].date }}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills()[0].date }}{{ project.get_bills()[-1].date }}
{% endblock %} -- cgit v1.1